Add a should_render.html partial

Encapsulates the decision making about whether a page should be rendered.
This commit is contained in:
Eryn Wells 2024-11-13 17:03:17 -08:00
parent 94181c0f15
commit c4821daa6e
3 changed files with 4 additions and 3 deletions

View file

@ -9,8 +9,8 @@
{{ with $page.RegularPages.ByPublishDate -}}
<section class="main__posts-by-year">
{{ range $page.RegularPages.ByPublishDate -}}
{{ if or (not $page.Draft) hugo.IsDevelopment -}}
{{ range .Reverse -}}
{{ if partial "page/should_render.html" . -}}
{{ .Render "page_summary" }}
{{ end }}
{{ end }}