Omit drafts from the Prev/Next page navigation

This commit is contained in:
Eryn Wells 2024-10-27 07:24:38 -06:00
parent ff531f5194
commit 2f9f25f8c4

View file

@ -1,6 +1,7 @@
{{ if .Section }}
{{- $previousInSection := .PrevInSection -}}
{{- $nextInSection := .NextInSection -}}
{{ if .FirstSection }}
{{- $pages := where .FirstSection.RegularPagesRecursive "Draft" "eq" false -}}
{{- $previousInSection := $pages.Prev . -}}
{{- $nextInSection := $pages.Next . -}}
{{ if or $previousInSection $nextInSection }}
<ul class="page-navigation">