forked from drowl87/hextra_mirror
feat: add optional pagination control for blog articles (#590)
This commit is contained in:
parent
c2286c9dd1
commit
96b2f6145d
@ -163,6 +163,9 @@ params:
|
|||||||
# date | lastmod | publishDate | title | weight
|
# date | lastmod | publishDate | title | weight
|
||||||
sortBy: date
|
sortBy: date
|
||||||
sortOrder: desc # or "asc"
|
sortOrder: desc # or "asc"
|
||||||
|
|
||||||
|
article:
|
||||||
|
displayPagination: true
|
||||||
|
|
||||||
highlight:
|
highlight:
|
||||||
copy:
|
copy:
|
||||||
|
@ -38,11 +38,13 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
{{ partial "components/last-updated.html" . }}
|
{{- partial "components/last-updated.html" . -}}
|
||||||
{{ .Scratch.Set "reversePagination" true }}
|
{{- if (site.Params.blog.article.displayPagination | default true) -}}
|
||||||
{{ partial "components/pager.html" . }}
|
{{- .Scratch.Set "reversePagination" true -}}
|
||||||
{{ partial "components/comments.html" . }}
|
{{- partial "components/pager.html" . -}}
|
||||||
|
{{ end }}
|
||||||
|
{{- partial "components/comments.html" . -}}
|
||||||
</main>
|
</main>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user