{{ if eq .Kind "section" }} {{ end }} {{ $.Scratch.Set "_sectionpages" (slice) }} {{ range $sname, $spages := .Site.Sections }} {{ $.Scratch.Add "_sectionpages" ($.Site.GetPage "section" $sname) }} {{ end }} {{ $.Scratch.Set "_allpages" (slice) }} {{ range sort ($.Scratch.Get "_sectionpages") "Weight" }} {{ $.Scratch.Add "_allpages" . }} {{ range index $.Site.Sections .Section }} {{ $.Scratch.Add "_allpages" .Page }} {{ end }} {{ end }} {{ $allpages := $.Scratch.Get "_allpages" }}
{{ partial "script.html" . }}