diff options
author | Julien Dessaux | 2024-02-26 00:15:50 +0100 |
---|---|---|
committer | Julien Dessaux | 2024-02-26 00:15:50 +0100 |
commit | 5e4d09a6d71f1b55282607b89239f7183ecf02c4 (patch) | |
tree | 1b9620b367ce5e67ef8ddc125d7ac851dc20dea0 /layouts | |
parent | Added UpdateNeeded tags on all outdated doc articles (diff) | |
download | www-5e4d09a6d71f1b55282607b89239f7183ecf02c4.tar.gz www-5e4d09a6d71f1b55282607b89239f7183ecf02c4.tar.bz2 www-5e4d09a6d71f1b55282607b89239f7183ecf02c4.zip |
Fixed PublishDate inconsistencies in my custom theme
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 0367ee9..e4992fe 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -12,14 +12,23 @@ {{$.Scratch.Set "blog-pages" .Pages }} {{ end }} -{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006")}} +{{ $pag := .Paginate (( $.Scratch.Get "blog-pages").GroupByPublishDate "2006")}} {{ range $pag.PageGroups }} +{{ if ne .Key "0001" }} <h2>{{ T "post_posts_in" }} {{ .Key }}</h2> <ul> {{ range .Pages }} <li>{{ .PublishDate.Format "2006-01-02" }} - <a href="{{ .RelPermalink }}">{{ .Title }}</a> : {{ .Description }}</li> {{ end }} </ul> +{{ else }} +<h2>Docs</h2> +<ul> + {{ range .Pages }} + <li><a href="{{ .RelPermalink }}">{{ .Title }}</a> : {{ .Description }}</li> + {{ end }} +</ul> +{{ end }} {{ end }} {{ partial "pagination.html" . }} {{ end }} |