From a59f4719f43d94fb9d664a1e6e0caae46faa6484 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 13 Jun 2017 09:30:46 +0100 Subject: [PATCH] Nested sections! --- content/robotics/{2014.md => 2014/_index.md} | 0 layouts/_default/list.html | 5 ++-- layouts/partials/navbar.html | 31 ++++++++++++-------- 3 files changed, 21 insertions(+), 15 deletions(-) rename content/robotics/{2014.md => 2014/_index.md} (100%) diff --git a/content/robotics/2014.md b/content/robotics/2014/_index.md similarity index 100% rename from content/robotics/2014.md rename to content/robotics/2014/_index.md diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b0d9a46..c1e055a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -10,12 +10,13 @@ {{ end }} {{ .Content }} - + {{ end }} {{ if ne .Params.hide_pages "true" }}
{{ $parent := . }} - {{ range where .Pages.ByTitle "Params.show_in_nav" "!=" "false" }} + {{ $valid_pages := where .Site.Pages.ByTitle ".Parent" "!=" nil }} + {{ range where $valid_pages ".Parent.UniqueID" $parent.UniqueID }} {{ if $parent.Params.show_images }} {{ partial "box_image.html" . }} {{ else }} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 4224ff0..b351e40 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -2,20 +2,25 @@

{{ title .Site.Title }}