diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 4f49e87..9830011 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -5,7 +5,8 @@ {{ $home := .Site.GetPage "home" }} {{ range where .Site.Pages.ByTitle "Kind" "section" }} {{ if eq .Parent $home }} - {{ $valid_children := where .Site.Pages.ByTitle ".Parent" "!=" nil }} + {{ $sorted_pages := sort .Site.Pages (default "Title" .Params.sort_by) (default "asc" .Params.sort_order)}} + {{ $valid_children := where $sorted_pages ".Parent" "!=" nil }} {{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }} {{ $children := where $children ".Params.hide_in_nav" "!=" "true" }}