diff options
author | John Siu (imacpro) <john.sd.siu@gmail.com> | 2020-08-22 17:40:39 +0300 |
---|---|---|
committer | John Siu (imacpro) <john.sd.siu@gmail.com> | 2020-08-22 17:40:39 +0300 |
commit | af30c23599fea25f548a53490759d566875ce28c (patch) | |
tree | a416faf5f3469385792cf75fee0ca32483bfccb5 | |
parent | 57d33ae464d324abf834e8ce5b489a7d0df925aa (diff) |
list.html
- rm .Scratch
- /tags page alphabetical order
-rw-r--r-- | layouts/_default/list.html | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2acc16b..95dc594 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,12 +1,13 @@ {{define "main"}} <!--$paginator--> +{{$p := .Pages}} {{if .IsHome}} -{{.Scratch.Set "Paginator" (.Paginate (where .Site.RegularPages "Type" "in" site.Params.mainSections))}} -{{else}} -{{.Scratch.Set "Paginator" .Paginator}} +{{$p = where site.RegularPages "Type" "in" site.Params.mainSections}} +{{else if eq .Kind "taxonomy"}} +{{$p = $p.ByTitle}} {{end}} -{{$paginator:=(.Scratch.Get "Paginator")}} +{{$paginator := .Paginate $p}} <!--list--> <ul> |