{{ $page := . }} {{ $authors := partial "paige/authors.html" $page }} {{ $categories := $page.Params.categories | default slice | uniq }} {{ $commiturl := "" }} {{ $date := $page.PublishDate }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }} {{ $description := $page.Description | markdownify }} {{ $draft := $page.Draft }} {{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }} {{ $flags := slice }} {{ $future := and $page.PublishDate (gt $page.PublishDate now) }} {{ $modified := and $page.PublishDate $page.Lastmod (lt $page.PublishDate $page.Lastmod) }} {{ $pinned := $page.Params.paige.pin }} {{ $readingtime := $page.ReadingTime }} {{ $series := $page.Params.series }} {{ $summary := $page.Summary | plainify }} {{ $tags := $page.Params.tags | default slice | uniq }} {{ $title := $page.Title | markdownify }} {{ $titlelink := $page.RelPermalink }} {{ if and (.Param "paige.git.commit_url") .GitInfo }} {{ $commiturl = printf (.Param "paige.git.commit_url") .GitInfo.Hash }} {{ end }} {{ if $draft }} {{ $flags = $flags | append "paige-draft" "paige-unpublished" }} {{ end }} {{ if $expired }} {{ $flags = $flags | append "paige-expired" "paige-unpublished" }} {{ end }} {{ if $future }} {{ $flags = $flags | append "paige-future" "paige-unpublished" }} {{ end }} {{ if $modified }} {{ $flags = $flags | append "paige-modified" }} {{ end }} {{ if not (or $draft $expired $future) }} {{ $flags = $flags | append "paige-published" }} {{ end }} {{ $flags = delimit ($flags | uniq) " " }} {{ $class := delimit (slice "mb-3" "paige-page" "w-100" | append $flags | uniq | sort) " " }}
{{ if $pinned -}} {{ i18n "paige_pinned_page" }} {{ end }}{{ . }}
{{ end }} {{ with $description }}{{ . }}
{{ end }} {{ with $summary }}{{ . }}
{{ 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 $i, $term := sort $terms "name" -}} {{- if gt $i 0 }}, {{ end -}} {{- $title := $term.name -}} {{- with (site.GetPage $term.url).Title -}} {{- $title = . -}} {{- end -}} {{ $title }} {{- end }}
{{ end }} {{ 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 }} {{ end }} {{ with $date }}{{ with $commiturl }} {{ end }} {{ if $commiturl }} {{ end }}
{{ end }} {{ with $readingtime }}{{ . }} {{ i18n "paige_minutes" . }}
{{ end }}