diff options
author | breadcat | 2020-06-29 11:43:01 +0100 |
---|---|---|
committer | breadcat | 2020-06-29 11:43:01 +0100 |
commit | 36c11b1ac2d2c5551f80ea5b2a67db82454a9fac (patch) | |
tree | 39310e2f3a581f8ba6d90deb224add27894ed669 /themes/Brine/layouts/_default | |
parent | eedc7051833c8174f681983f3dd73d73459a5e02 (diff) | |
download | blog.minskio.co.uk-36c11b1ac2d2c5551f80ea5b2a67db82454a9fac.tar.gz blog.minskio.co.uk-36c11b1ac2d2c5551f80ea5b2a67db82454a9fac.tar.bz2 blog.minskio.co.uk-36c11b1ac2d2c5551f80ea5b2a67db82454a9fac.zip |
Filter posts to just posts
Thanks to he-nk at the hugo forums for this.
Diffstat (limited to 'themes/Brine/layouts/_default')
-rw-r--r-- | themes/Brine/layouts/_default/list.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/Brine/layouts/_default/list.html b/themes/Brine/layouts/_default/list.html index fd2efae..0908d28 100644 --- 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 }} |