paginator chrono ordering, propogating to listed pages
[kengrimes.com/theme.git] / layouts / _default / list.html
index 33555c4..aad3e96 100644 (file)
@@ -1,5 +1,5 @@
 {{- define "main" -}}
-{{ $paginator := .Paginate (where .Data.Pages.ByDate "Section" .Section) 5 }}
+{{ $paginator := .Paginate (where .Data.Pages.ByLastmod.Reverse "Section" .Section) 5 }}
 {{- if (gt (len (findRE "<h1" .Content)) 0) -}}
 {{ replaceRE "(<h1.*</h1>)" "</article>\n$1\n<article>" .Content | strings.TrimLeft "\n " | strings.TrimPrefix "</article>" | replaceRE "\n" "\n      " | safeHTML }}</article>
 {{- else -}}
@@ -7,7 +7,7 @@
 {{- end -}}
       <div class="speedy-cards">
         {{- $rsc := .Resources }}
-        {{- range $paginator.Pages.ByLastmod.Reverse }}
+        {{- range $paginator.Pages }}
         {{- $secHead := cond (not .Params.header) ($rsc.GetMatch "header.png") (string .Params.header | $rsc.GetMatch) }}
         {{- $secHead := cond (not $secHead) (relURL "/img/speedy.png") $secHead.RelPermalink }}
         <a href="{{ .RelPermalink }}">