News and author pages: listPosts per page, with pager
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
{{ define "main" }}
|
||||
<p class="crumbs" data-pagefind-ignore>{{ with site.GetPage "/post" }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }} › <a href="{{ .Parent.RelPermalink }}">Authors</a></p>
|
||||
<h1>Posts by {{ .Title }}</h1>
|
||||
{{ $pager := .Paginate .Pages.ByDate.Reverse (site.Params.listPosts | default 20) }}
|
||||
<div class="posts">
|
||||
{{ range .Pages.ByDate.Reverse }}{{ partial "post-summary.html" . }}{{ end }}
|
||||
{{ range $pager.Pages }}{{ partial "post-summary.html" . }}{{ end }}
|
||||
</div>
|
||||
{{ partial "pager.html" $pager }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user