From 30d3249782b84c95ee8f9b175e8238ce9ed91a2a Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 12 Oct 2021 00:13:26 +0800 Subject: [PATCH] Remove the host of the search result URLs --- _includes/search-loader.html | 2 +- assets/js/data/search.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/search-loader.html b/_includes/search-loader.html index 9d0a285..d07b63c 100644 --- a/_includes/search-loader.html +++ b/_includes/search-loader.html @@ -5,7 +5,7 @@ {% capture result_elem %}
- {title} + {title}
{categories} {tags} diff --git a/assets/js/data/search.json b/assets/js/data/search.json index 30833b9..76bee41 100644 --- a/assets/js/data/search.json +++ b/assets/js/data/search.json @@ -6,7 +6,7 @@ layout: compress {% for post in site.posts %} { "title": "{{ post.title | escape }}", - "url": "{{ site.baseurl }}{{ post.url }}", + "url": "{{ post.url | relative_url }}", "categories": "{{ post.categories | join: ', '}}", "tags": "{{ post.tags | join: ', ' }}", "date": "{{ post.date }}",