{{ define "main" }}
Sitemap⁄{{ substr site.Title 0 1 }}{{ substr site.Title 1 }}{{ with .Section }} ({{ . }}/){{ end }}
{{- $graph := partialCached "graph.html" site site.Language.Lang -}} {{- $shown := newScratch -}} {{- $section := .Section -}} {{- range where site.Pages "Kind" "in" (slice "page" "section") -}} {{- $entry := index $graph.pages .Path -}} {{- if and (eq $entry.depth 0) $entry.children -}} {{- partial "sitemap-entry.html" (dict "page" . "section" $section "remaining" 2 "shown" $shown) -}} {{- end -}} {{- end -}} {{- range site.RegularPages -}} {{- if not ($shown.Get .Path) -}} {{- partial "sitemap-entry.html" (dict "page" . "section" $section "remaining" 0 "shown" $shown) -}} {{- end -}} {{- end -}} {{ end }}