From db9bbfe5464dcfc181b3087bc866bd3d546d3ac1 Mon Sep 17 00:00:00 2001 From: Abel Cheung Date: Mon, 24 Jun 2019 05:11:26 +0800 Subject: [PATCH] Obsoletes navbarlink with relative_url filter (#508) --- _includes/nav.html | 28 +++++++++++++--------------- _includes/navbarlink.html | 16 ---------------- 2 files changed, 13 insertions(+), 31 deletions(-) delete mode 100644 _includes/navbarlink.html diff --git a/_includes/nav.html b/_includes/nav.html index a0d26b8..c2bdf66 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -7,33 +7,31 @@ - {% if site.title-img %} + {%- if site.title-img -%} - {% else %} + {%- else -%} {{ site.title }} - {% endif %} + {%- endif -%} diff --git a/_includes/navbarlink.html b/_includes/navbarlink.html deleted file mode 100644 index d8005e6..0000000 --- a/_includes/navbarlink.html +++ /dev/null @@ -1,16 +0,0 @@ -{% capture before %}{{ include.link[1] | split: "://" | first }}{% endcapture %} -{% capture after %}{{ include.link[1] | split: "://" | last }}{% endcapture %} -{% assign internal = true %} -{% if before != after %} - {% if before == "http" or before == "https" %} - {% assign internal = false %} - {% endif %} -{% endif %} - -{% if internal %} - {% capture linkurl %}{{ include.link[1] | relative_url }}{% endcapture %} -{% else %} - {% capture linkurl %}{{ include.link[1] }}{% endcapture %} -{% endif %} - -{{ include.link[0] }}