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 }}