blog.minskio.co.uk

Content and theme behind minskio.co.uk
Log | Files | Refs

commit dceac236568b7a30a17b856ddd3ad3d543e4297c
parent 6e62237fdbaaf3cbf2e93f110994765b85693ebb
Author: breadcat <peter@minskio.co.uk>
Date:   Tue, 10 Nov 2020 16:39:17 +0000

Fix longstanding tags bug

Tag index pages would not be filtered by tag. There's probably a more
efficient way of doing this, but it works for the time being.

Diffstat:
Mthemes/Brine/layouts/_default/list.html | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/themes/Brine/layouts/_default/list.html b/themes/Brine/layouts/_default/list.html @@ -1,4 +1,12 @@ {{ define "main" }} <h1>{{ .Title }}</h1> - <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 }} -\ No newline at end of file +<ul> +{{ if .IsHome }} + {{ $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 }} +{{ else }} + {{ range .Pages.ByDate.Reverse }} + <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 }} +{{ end }} +</ul>{{ partial "pagination.html" $ }}{{ end }} +