From 0cfc0f0357a3b98997ddafe05f819537ffcd1980 Mon Sep 17 00:00:00 2001 From: Peter Mosses Date: Fri, 16 Aug 2019 13:32:24 +0200 Subject: [PATCH] Update nav.html A `navigation-list-child-list` is not displayed unless the enclosing `navigation-list-item` is `active`, so it needs to be generated only when `page.url == node.url or page.parent == node.title or page.grand_parent == node.title`. --- _includes/nav.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_includes/nav.html b/_includes/nav.html index d561a42..1c1dd2b 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -10,6 +10,7 @@ {%- endif -%} {{ node.title }} {%- if node.has_children -%} + {%- if page.url == node.url or page.parent == node.title or page.grand_parent == node.title -%} {%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%} {%- endif -%} + {%- endif -%} {%- endif -%} {%- endunless -%}