1
0
mirror of https://github.com/thangisme/notes.git synced 2024-12-21 13:46:39 -05:00

Add condition for nav exclude

This commit is contained in:
Patrick Marsceill 2018-11-16 13:57:32 -05:00
parent fa40528acd
commit 6540493df2
No known key found for this signature in database
GPG Key ID: 286B93882D828F40

View File

@ -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>