commit 36c11b1ac2d2c5551f80ea5b2a67db82454a9fac
parent eedc7051833c8174f681983f3dd73d73459a5e02
Author: breadcat <peter@minskio.co.uk>
Date: Mon, 29 Jun 2020 11:43:01 +0100
Filter posts to just posts
Thanks to he-nk at the hugo forums for this.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/themes/Brine/layouts/_default/list.html b/themes/Brine/layouts/_default/list.html
@@ -1,5 +1,5 @@
{{ define "main" }} <h1>{{ .Title }}</h1>
- <ul>{{ range $index, $element := .Paginator.Pages }}
+ <ul>{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "posts") }}{{ range $paginator.Pages }}
<li><h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3><span>{{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }} updated{{ end }}, {{ .ReadingTime }} min read</span></li>{{ end }}
</ul>
{{ partial "pagination.html" $ }}{{ end }}