From 8af06a4c551103c5a6c4fee7cac9f846673290ae Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 12 Nov 2017 15:36:36 +0000 Subject: [PATCH] Show static pages in navbar --- layouts/partials/nav_pages.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/partials/nav_pages.html b/layouts/partials/nav_pages.html index 04407e5..47e0820 100644 --- a/layouts/partials/nav_pages.html +++ b/layouts/partials/nav_pages.html @@ -1,11 +1,13 @@ {{ $home := .Site.GetPage "home" }} -{{ range where .Site.Pages.ByTitle "Kind" "section" }} - {{ if eq .Parent $home }} +{{ $sections := where (where .Site.Pages.ByTitle "Kind" "section") "Parent.UniqueID" $home.UniqueID }} +{{ $pages := where (where .Site.Pages.ByTitle "Kind" "page") "Section" "" }} +{{ $nav_pages := union $pages $sections }} + +{{ range sort $nav_pages "LinkTitle" }} - {{ end }} {{ end }}