mirror of
https://github.com/imfing/hextra.git
synced 2025-08-23 02:36:57 -04:00
feat: add optional pagination control for blog articles (#590)
This commit is contained in:
@@ -163,6 +163,9 @@ params:
|
||||
# date | lastmod | publishDate | title | weight
|
||||
sortBy: date
|
||||
sortOrder: desc # or "asc"
|
||||
|
||||
article:
|
||||
displayPagination: true
|
||||
|
||||
highlight:
|
||||
copy:
|
||||
|
@@ -38,11 +38,13 @@
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "components/last-updated.html" . }}
|
||||
{{ .Scratch.Set "reversePagination" true }}
|
||||
{{ partial "components/pager.html" . }}
|
||||
{{ partial "components/comments.html" . }}
|
||||
{{- partial "components/last-updated.html" . -}}
|
||||
{{- if (site.Params.blog.article.displayPagination | default true) -}}
|
||||
{{- .Scratch.Set "reversePagination" true -}}
|
||||
{{- partial "components/pager.html" . -}}
|
||||
{{ end }}
|
||||
{{- partial "components/comments.html" . -}}
|
||||
</main>
|
||||
</article>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user