{{- define "singlebody" -}} {{ $cssOutput := "" }} {{ $cssHashes := "" }} {{ $s := partialCached "scratch.html" . }} {{ $p := $.GetPage .Params.print }} {{ $scratch := $s.Get (printf "/%s" $p.File) }} {{ $authorsPages := (slice) }} {{ with $p.Params.authors }} {{ range $n, $authorFile := . }} {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} {{ $authorsPages = (uniq $authorsPages) | append $author }} {{ end }} {{ end }} {{ $editorsPages := (slice) }} {{ with $p.Params.editors }} {{ range $n, $editorFile := . }} {{ $editor := $.GetPage (printf "/editor/%s" $editorFile) }} {{ $editorsPages = (uniq $editorsPages) | append $editor }} {{ end }} {{ end }} {{ $currentDir := "" }} {{ with .File }} {{ $currentDir = .Dir }} {{ end }}
{{ partial "printsinglebody.html" $p }}
{{ $p.Content }}
{{ range $scratch.has_children }}
{{ $addS := 0 }} {{ with .Params.authors }} {{ $addS = len . }} {{ end }} {{ with .Params.editors }} {{ range $n, $editorFile := . }} {{ $editor := $.GetPage (printf "/editor/%s" $editorFile) }} {{ $editorsPages = (uniq $editorsPages) | append $editor }} {{ end }} {{ end }} {{ range $n, $authorFile := .Params.authors }} {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} {{ $authorsPages = (uniq $authorsPages) | append $author }} {{ if eq $n 0 }}
author{{ with (gt $addS 1) }}s{{ end }}⁄{{ $author.Title }} {{ else }} , {{ $author.Title }} {{ end }} {{ end }} {{ with .Params.authors }}
{{ end }} {{ $tit := .Title }} {{ if gt (len .Title) 54 }} {{ $tit = printf "%s…" (substr .Title 0 50) }} {{ end }}
{{ index $scratch.crust 0 }}⁄{{ $tit }}
{{ partial "printsinglebody.html" . }} {{ .Content }} {{ $kid := $s.Get (printf "/%s" .File) }} {{ range $kid.has_children }}
{{ $addS := 0 }} {{ with .Params.authors }} {{ $addS = len . }} {{ end }} {{ range $n, $authorFile := .Params.authors }} {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} {{ if eq $n 0 }}
author{{ with (gt $addS 1) }}s{{ end }}⁄{{ $author.Title }} {{ else }} , {{ $author.Title }} {{ end }} {{ end }} {{ with .Params.authors }}
{{ end }} {{ $tit := .Title }} {{ if gt (len .Title) 54 }} {{ $tit = printf "%s…" (substr .Title 0 50) }} {{ end }}
{{ index $scratch.crust 0 }}⁄{{ $tit }}
{{ partial "printsinglebody.html" . }} {{ .Content }} {{ end }} {{ end }} {{ range union (uniq $editorsPages) (uniq $authorsPages) }}
{{ index $scratch.mantle 0 }}⁄{{ $p.Title }}
{{ substr .File.Dir 0 -1 }}⁄{{ .Title }}
{{ .Content }} {{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }} {{ $ss := $s.Get (printf "/%s" .File) }}
{{ with $ss }}
mentioned in⁄
{{ end }}
{{ range $ss.backlinks }} {{ end }}
{{ end }} {{ end }} {{- end -}}