From 5cd46ba963b57aff3394afc510942454598a52b4 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 27 Apr 2019 21:00:13 +0100 Subject: [PATCH] Remove unnecessary manual calculation of top-level sections --- layouts/partials/nav_pages.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/layouts/partials/nav_pages.html b/layouts/partials/nav_pages.html index 53c6b28..cc604a0 100644 --- a/layouts/partials/nav_pages.html +++ b/layouts/partials/nav_pages.html @@ -1,8 +1,7 @@ {{ $home := .Site.GetPage "home" }} -{{ $sections := where (where .Site.Pages.ByTitle "Kind" "section") "Parent.File.UniqueID" $home.File.UniqueID }} {{ $pages := where .Site.RegularPages.ByTitle "Section" "" }} -{{ $nav_pages := union $pages $sections }} +{{ $nav_pages := union $pages .Site.Sections }} {{ range sort $nav_pages "LinkTitle" }}