Update index page to link to all posts

This commit is contained in:
Alex Selimov 2025-07-11 23:14:20 -04:00
parent 5a2b4c0f1f
commit f57ac2b8cc
Signed by: aselimov
GPG key ID: 3DDB9C3E023F1F31
2 changed files with 32 additions and 30 deletions

View file

@ -12,9 +12,7 @@
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ range $paginator.Pages }}
{{ range ( where .Site.RegularPages "Type" "posts" | first .Site.Params.postsToShowOnIndex) }}
<article class="post on-list">
<h2 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
@ -60,7 +58,8 @@
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
<center>
<a href="/posts" class="button inline" >[Go to all posts]</a>
</center>
</div>
{{ end }}