Omit drafts from the Prev/Next page navigation
This commit is contained in:
parent
ff531f5194
commit
2f9f25f8c4
1 changed files with 4 additions and 3 deletions
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue