diff --git a/layouts/partials/page/descendent_section.list.html b/layouts/partials/page/descendent_section.list.html index f96f402..cd93df7 100644 --- a/layouts/partials/page/descendent_section.list.html +++ b/layouts/partials/page/descendent_section.list.html @@ -9,8 +9,8 @@ {{ with $page.RegularPages.ByPublishDate -}}
- {{ range $page.RegularPages.ByPublishDate -}} - {{ if or (not $page.Draft) hugo.IsDevelopment -}} + {{ range .Reverse -}} + {{ if partial "page/should_render.html" . -}} {{ .Render "page_summary" }} {{ end }} {{ end }} diff --git a/layouts/partials/page/first_section.list.html b/layouts/partials/page/first_section.list.html index 2dc62e3..6a931d7 100644 --- a/layouts/partials/page/first_section.list.html +++ b/layouts/partials/page/first_section.list.html @@ -25,7 +25,7 @@

{{ .Title }}

{{ range .RegularPagesRecursive.ByPublishDate.Reverse -}} - {{ if or (not .Draft) hugo.IsDevelopment -}} + {{ if partial "page/should_render.html" . -}} {{ .Render "page_summary" }} {{ end }} {{ end }} diff --git a/layouts/partials/page/should_render.html b/layouts/partials/page/should_render.html new file mode 100644 index 0000000..739b46d --- /dev/null +++ b/layouts/partials/page/should_render.html @@ -0,0 +1 @@ +{{ return or (not .Draft) hugo.IsDevelopment }}