1
Fork 0

Remove unnecessary manual calculation of top-level sections

This commit is contained in:
Jake Howard 2019-04-27 21:00:13 +01:00
parent e65f54ff62
commit 5cd46ba963
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -1,8 +1,7 @@
{{ $home := .Site.GetPage "home" }} {{ $home := .Site.GetPage "home" }}
{{ $sections := where (where .Site.Pages.ByTitle "Kind" "section") "Parent.File.UniqueID" $home.File.UniqueID }}
{{ $pages := where .Site.RegularPages.ByTitle "Section" "" }} {{ $pages := where .Site.RegularPages.ByTitle "Section" "" }}
{{ $nav_pages := union $pages $sections }} {{ $nav_pages := union $pages .Site.Sections }}
{{ range sort $nav_pages "LinkTitle" }} {{ range sort $nav_pages "LinkTitle" }}
<li class="nav-item"> <li class="nav-item">