diff --git a/layouts/print/single.html b/layouts/print/single.html index eaeac2b..1a4a24e 100644 --- a/layouts/print/single.html +++ b/layouts/print/single.html @@ -62,6 +62,22 @@ {{ $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 }} @@ -78,8 +94,17 @@ {{ 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 }}