Remove the host of the search result URLs

This commit is contained in:
Cotes Chung 2021-10-12 00:13:26 +08:00
parent fa15aebbca
commit 30d3249782
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
{% capture result_elem %}
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
<a href="{{ site.url }}{url}">{title}</a>
<a href="{url}">{title}</a>
<div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
{categories}
{tags}

View File

@ -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 }}",