From 75e9feb68706eab3354223985d0c83c3da264612 Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Mon, 18 Jan 2021 23:27:43 +0800
Subject: [PATCH] Optimize url filters
---
_includes/disqus.html | 6 +++---
_includes/post-sharing.html | 2 +-
_includes/search-loader.html | 4 ++--
robots.txt | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/_includes/disqus.html b/_includes/disqus.html
index 4b4b149..a750c27 100644
--- a/_includes/disqus.html
+++ b/_includes/disqus.html
@@ -13,16 +13,16 @@
-
+
\ No newline at end of file
+
diff --git a/_includes/post-sharing.html b/_includes/post-sharing.html
index 04e41ee..e71049e 100644
--- a/_includes/post-sharing.html
+++ b/_includes/post-sharing.html
@@ -11,7 +11,7 @@
{{ site.data.share.label }}
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
- {% assign url = page.url | relative_url | prepend: site.url %}
+ {% assign url = page.url | absolute_url %}
{% for share in site.data.share.platforms %}
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
diff --git a/_includes/search-loader.html b/_includes/search-loader.html
index af7ebb1..1c2565e 100644
--- a/_includes/search-loader.html
+++ b/_includes/search-loader.html
@@ -25,8 +25,8 @@
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('search-results'),
- json: '{{ site.baseurl }}/assets/js/data/search.json',
+ json: '{{ '/assets/js/data/search.json' | relative_url }}',
searchResultTemplate: '{{ result_elem | strip_newlines }}',
noResultsText: '{{ not_found }}'
});
-
\ No newline at end of file
+
diff --git a/robots.txt b/robots.txt
index ad4a840..997ca7c 100644
--- a/robots.txt
+++ b/robots.txt
@@ -12,4 +12,4 @@ User-agent: *
Disallow: /norobots/
-Sitemap: {{ site.url | append: site.baseurl }}/sitemap.xml
\ No newline at end of file
+Sitemap: {{ '/sitemap.xml' | absolute_url }}