{{ $params := . }} {{ $fullpages := false }} {{ $page := . }} {{ if reflect.IsMap $params }} {{ $fullpages = $params.fullpages }} {{ $page = $params.page }} {{ end }} {{ $authors := partial "paige/authors.html" $page }} {{ $categories := $page.Params.categories | default slice | uniq }} {{ $class := $fullpages }} {{ $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 }} {{ $id := not $fullpages }} {{ $nogap := "mb-0" }} {{ $readingtime := $page.ReadingTime }} {{ $series := $page.Params.series }} {{ $tags := $page.Params.tags | default slice | uniq }} {{ $title := $page.Title | markdownify }} {{ $titlelink := $page.Params.link }} {{ $titlepage := $page.RelPermalink }} {{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }} {{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }} {{ end }}
{{ with $title }}

{{ with $titlelink }}{{ . }}{{ else }}{{ . }}{{ end }}{{ if $fullpages }}#{{ end }}

{{ end }} {{ with $description }}

{{ . }}

{{ end }} {{ if or $categories $tags }}

{{ $terms := slice }} {{ range $categories }} {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL)) }} {{ end }} {{ range $tags }} {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL)) }} {{ end }} {{ range sort $terms "name" }} {{ .name }} {{ end }}

{{ end }} {{ if or $authors $date $readingtime $series }}
{{ with $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 }}
{{ end }}