From d9bf5025f3197f7c505f29c54f0bcb432e4339d8 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 20 Mar 2018 16:16:42 -0400 Subject: [PATCH] Use `relative_url` filter --- _includes/nav_list | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_includes/nav_list b/_includes/nav_list index d264577a..b1d06c30 100644 --- a/_includes/nav_list +++ b/_includes/nav_list @@ -10,12 +10,12 @@ {% if nav.url %} {% comment %} internal/external URL check {% endcomment %} {% if nav.url contains "://" %} - {% assign domain = "" %} + {% assign nav_url = nav.url %} {% else %} - {% assign domain = site.url | append: site.baseurl %} + {% assign nav_url = nav.url | relative_url %} {% endif %} - {{ nav.title }} + {{ nav.title }} {% else %} {{ nav.title }} {% endif %} @@ -25,9 +25,9 @@ {% for child in nav.children %} {% comment %} internal/external URL check {% endcomment %} {% if child.url contains "://" %} - {% assign domain = "" %} + {% assign child_url = child.url %} {% else %} - {% assign domain = site.url | append: site.baseurl %} + {% assign child_url = child.url | relative_url %} {% endif %} {% comment %} set "active" class on current page {% endcomment %} @@ -37,7 +37,7 @@ {% assign active = "" %} {% endif %} -
  • {{ child.title }}
  • +
  • {{ child.title }}
  • {% endfor %} {% endif %}