Skip to content

Commit

Permalink
Exclude pages without title from nav (e.g. redirects)
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Feb 2, 2020
1 parent e2e01ef commit 672de29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}
Expand Down

0 comments on commit 672de29

Please sign in to comment.