feat: migrate prev/next pager to Hugo's cascade system

New cascade front matter param: .Params.pager

Close #2737
See #2395
This commit is contained in:
Geo 2022-06-02 20:12:36 +01:00
commit 076464227c
4 changed files with 5 additions and 4 deletions

View file

@ -14,6 +14,7 @@ cascade:
# Blog post options
- _target:
path: /post/**
pager: true
editable: true
reading_time: true
commentable: true

View file

@ -83,9 +83,9 @@
{{ partial "tags.html" . }}
{{/* Show next/previous pages by default. */}}
{{ if ne site.Params.book_section_pager false }}
{{ if ne .Params.pager false }}
<div class="article-widget">
{{ partial "section_pager" . }}
{{ partial "components/pager" . }}
</div>
{{ end }}
</div>

View file

@ -4,9 +4,9 @@
{{ partial "page_author" . }}
{{ partial "comments" . }}
{{ if site.Params.section_pager }}
{{ if .Params.pager }}
<div class="article-widget">
{{ partial "section_pager" . }}
{{ partial "components/pager" . }}
</div>
{{ end }}