{{ $page := . }} {{ $authors := partial "paige/authors.html" $page }} {{ $categories := $page.Params.categories | default slice | uniq }} {{ $commiturl := "" }} {{ $date := cond (eq ($page.Param "paige.date.source" | default "published") "published") $page.PublishDate $page.Lastmod }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }} {{ $description := $page.Description | markdownify }} {{ $link := $page.Params.link }} {{ $readingtime := $page.ReadingTime }} {{ $series := $page.Params.series }} {{ $tags := $page.Params.tags | default slice | uniq }} {{ $title := $page.Title | markdownify }} {{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }} {{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }} {{ end }}
{{ . }}
{{ end }} {{ if or $categories $tags }}{{ $terms := slice }} {{ range $categories }} {{ $terms = $terms | append (dict "name" . "url" (printf "categories/%v/" . | relLangURL | string)) }} {{ end }} {{ range $tags }} {{ $terms = $terms | append (dict "name" . "url" (printf "tags/%v/" . | relLangURL | string)) }} {{ end }} {{ range sort $terms "name" }} {{ $name := .name }} {{ with site.GetPage .url }} {{ $name = .Title }} {{ end }} {{ $name }} {{ end }}
{{ end }} {{ if or $authors $date $readingtime $series }}{{ range $i, $name := . -}} {{- if gt $i 0 }}, {{ end -}} {{- with site.GetPage (print "series/" $name) -}} {{ .Title | default $name }} {{- else -}} {{- $name -}} {{- end -}} {{- end }}
{{ end }} {{ with $authors }}{{ range $i, $author := . -}} {{- if gt $i 0 }}, {{ end -}} {{- with $author.id -}} {{- with site.GetPage (print "authors/" .) -}} {{ .Title | default $author.name }} {{- else -}} {{- $author.name -}} {{- end -}} {{- else -}} {{- $author.name -}} {{- end -}} {{- end }}
{{ end }} {{ with $date }}{{ with $commiturl }} {{ end }} {{ if $commiturl }} {{ end }}
{{ end }} {{ with $readingtime }}{{ . }} {{ i18n "paige_minutes" . }}
{{ end }}