From ff9663f376dbb8aa3af6ec8bfb465402bfdf17f5 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 6 Jan 2020 04:11:30 +0800 Subject: [PATCH] Fixed related URL. --- _includes/sidebar.html | 9 +++++---- _layouts/post.html | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/_includes/sidebar.html b/_includes/sidebar.html index c35d615..b2066d3 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -10,11 +10,12 @@
- {% assign avatar = site.avatar %} - {% if avatar | slice: 0 == '/' %} - {% assign avatar = avatar | prepend: site.baseurl %} + {% assign avatar_url = site.avatar %} + {% capture start %}{{ site.avatar | slice: 0 }}{% endcapture %} + {% if start == '/' %} + {% assign avatar_url = avatar_url | prepend: site.baseurl %} {% endif %} - +
diff --git a/_layouts/post.html b/_layouts/post.html index 643132e..6ec15cf 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -53,7 +53,9 @@ layout: default {% endif %} {% if content contains '