Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/J-Siu/hugo-theme-sk1.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-08-22 17:40:39 +0300
committerJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-08-22 17:40:39 +0300
commitaf30c23599fea25f548a53490759d566875ce28c (patch)
treea416faf5f3469385792cf75fee0ca32483bfccb5
parent57d33ae464d324abf834e8ce5b489a7d0df925aa (diff)
list.html
- rm .Scratch - /tags page alphabetical order
-rw-r--r--layouts/_default/list.html9
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>