From 6540493df22ab05e49cdb97b9ea7935a4257fdc7 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill <patrick.marsceill@gmail.com> Date: Fri, 16 Nov 2018 13:57:32 -0500 Subject: [PATCH] Add condition for nav exclude --- _includes/nav.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_includes/nav.html b/_includes/nav.html index dba0deab..170fcfbd 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -1,7 +1,8 @@ <nav> <ul class="navigation-list"> {% assign pages_list = site.html_pages | sort:"nav_order" %} - {% for node in pages_list %} + {% for node in pages_list %} + {% unless node.nav_exclude %} <li class="navigation-list-item{% if page.url == node.url %} active{% endif %} js-side-nav-item"> {% if node.parent == nil or node.has_children == true %} <a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url or (page.parent != nil and page.parent == node.parent) %} active{% endif %}">{{ node.title }}</a> @@ -19,6 +20,7 @@ {% endif %} {% endif %} </li> - {% endfor %} + {% endunless %} + {% endfor %} </ul> </nav> -- GitLab