From 209ac7be7db196dec85c5d0698189bf1f49a4488 Mon Sep 17 00:00:00 2001 From: Peter Mosses Date: Thu, 22 Aug 2019 21:45:09 +0200 Subject: [PATCH] Update nav.html Restrict navigation to display only direct children. --- _includes/nav.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_includes/nav.html b/_includes/nav.html index 1c1dd2b..fdcf1e1 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -20,6 +20,7 @@ {%- endif -%} {{ child.title }} {%- if child.has_children -%} + {%- if page.url == child.url or page.parent == child.title -%} {%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%} {%- endif -%} + {%- endif -%} {%- endfor -%}