{{ define "singlebody" }} {{ $currentNode := . }} {{ $currentDir := "" }} {{ with .File }} {{ $currentDir = .Dir }} {{ end }} {{ $currentFile := (printf "/%s" .File) }} {{ $editFile := $.Site.GetPage "/edit" }} {{ $editFilePath := $editFile.RelPermalink }}
Sitemap⁄{{ substr $.Site.Title 0 1 }}{{ substr $.Site.Title 1 }} {{with $currentDir}}({{ . }}){{ end }}
{{ $s := partialCached "scratch.html" . }} {{ $noTriad := (slice) }} {{ range $p := .Site.RegularPages }} {{ $scratch := $s.Get (printf "/%s" $p.File) }} {{ if eq $scratch.depth "core" }}
{{- substr $p.File.Dir 0 -1 -}}⁄{{- $p.Title -}}[EDIT]
{{ range $coreKid := $scratch.has_children }}
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }} {{ range $mantleKid := $scratchCKid.has_children }} {{ end }}
{{ end }} {{ else if not (in (slice "core" "mantle" "crust") $scratch.depth)}} {{ $noTriad = $noTriad | append $p }} {{ else }}
{{ end }} {{ end }} {{ range $noTriad }}
{{- substr .File.Dir 0 -1 -}}⁄{{- .Title -}}{{ if not (or (hasPrefix .Dir "edit") (hasPrefix .Dir "print")) }}[EDIT]{{ end }}
{{ end }} {{ end }}