{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ $sections := .Site.Params.mainSections }} {{ $.Scratch.Set "authors" (slice ) }} {{ $.Scratch.Set "noAuthors" 0 }} {{ range where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ with .Params.authors }} {{ if eq ( printf "%T" . ) "[]string" }} {{ if ( not ( in ($.Scratch.Get "authors") . ) ) }} {{ $.Scratch.Add "authors" . }} {{ end }} {{ else if ( printf "%T" . ) "[]string" }} {{ range . }} {{ if ( not ( in ($.Scratch.Get "authors") . ) ) }} {{ $.Scratch.Add "authors" . }} {{ end }} {{ end }} {{ end }} {{ else }} {{ $.Scratch.Add "noAuthors" 1 }} {{ end }} {{ end }} {{ $.Scratch.Set "cats" (slice ) }} {{ $.Scratch.Set "nocat" 0 }} {{ range where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ with .Params.categories }} {{ if eq ( printf "%T" . ) "[]string" }} {{ if ( not ( in ($.Scratch.Get "cats") . ) ) }} {{ $.Scratch.Add "cats" . }} {{ end }} {{ end }} {{ else }} {{ $.Scratch.Add "nocat" 1 }} {{ end }} {{ end }} {{ $tags := $.Site.Taxonomies.tags.ByCount }} {{ $.Scratch.Set "untagged" 0 }} {{ range $pages }} {{ with .Params.tags }}{{ else }}{{ $.Scratch.Add "untagged" 1 }}{{ end }} {{ end }}
Items
Load all Items
{{ range $sections }} {{ end }}
{{ range .Site.Taxonomies.authors }} {{ end }} {{ if gt ( $.Scratch.Get "noAuthors") 0 }} {{ end }}
{{ range .Site.Taxonomies.categories }} {{ end }} {{ if gt ( $.Scratch.Get "nocat") 0 }} {{ end }}
{{ range $tags }} {{ if .Term }} {{ end }} {{ end }} {{ if gt ( $.Scratch.Get "untagged") 0 }} {{ end }}