1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-18 12:06:08 -05:00

Exclude pages without title from nav (e.g. redirects)

This commit is contained in:
Silvio Giebl 2020-02-02 20:54:02 +01:00
parent e2e01effa6
commit 672de29f2e

View File

@ -2,7 +2,7 @@
{%- assign pages_list = site.html_pages | sort: "nav_order" -%}
{%- for node in pages_list -%}
{%- unless node.nav_exclude -%}
{%- if node.parent == nil -%}
{%- if node.parent == nil and node.title -%}
<li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
{%- if page.parent == node.title or page.grand_parent == node.title -%}
{%- assign first_level_url = node.url | absolute_url -%}