{{ $page := . }} {{ $alert := $page.Param "paige.alert" }} {{ $authors := partial "paige/func-authors.html" $page | and ($page.Param "paige.pages.disable_authors" | not) }} {{ $categories := $page.GetTerms "categories" }} {{ $date := and $page.IsPage $page.PublishDate | and ($page.Param "paige.pages.disable_date" | not) }} {{ $description := $page.Description | markdownify | and ($page.Param "paige.pages.disable_description" | not) }} {{ $first := templates.Exists "partials/paige/page-header-first.html" }} {{ $format := $page.Param "paige.date_format" | default ":date_long" }} {{ $last := templates.Exists "partials/paige/page-header-last.html" }} {{ $link := $page.Params.link }} {{ $microdata := $page.Params.paige.pages.microdata }} {{ $normal := eq ($page.Param "paige.keyword_style" | default "text") "text" }} {{ $series := $page.GetTerms "series" | and ($page.Param "paige.pages.disable_series" | not) }} {{ $tags := $page.GetTerms "tags" }} {{ $time := $page.ReadingTime | and ($page.Param "paige.pages.disable_reading_time" | not) }} {{ $title := $page.LinkTitle | markdownify | and ($page.Param "paige.pages.disable_title" | not) }} {{ $toc := and $page.Content (ne $page.TableOfContents ``) | and ($page.Param "paige.pages.disable_toc" | not) }} {{ $keywords := sort (append $categories $tags) "LinkTitle" | and ($page.Param "paige.pages.disable_keywords" | not) }} {{ if or $alert $authors $date $description $first $keywords $last $time $series $title $toc }}
{{ partial "paige/func-include.html" (dict "name" "page-header-first%s.html" "page" $page) }} {{ with $title }}

{{ if $link }}{{ . }}{{ else }}{{ . }}{{ end }}

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

{{ . }}

{{ end }} {{ if or $authors $date $keywords $time $series }}
{{ with $keywords }}

{{ range $i, $term := . -}} {{- $kind := false -}} {{- if in $categories $term -}} {{- $kind = "category" -}} {{- else -}} {{- $kind = "tag" -}} {{- end -}} {{- if $normal -}} {{- if gt $i 0 }} · {{ end -}} {{ .LinkTitle }} {{- else -}} {{- if gt $i 0 }} {{ end -}} {{ .LinkTitle }} {{- end -}} {{- end }}

{{ end }} {{ with $series }}

{{ range $i, $series := . -}} {{- if gt $i 0 }} · {{ end -}} {{ .LinkTitle }} {{- end }}

{{ end }} {{ with $authors }}

{{ range $i, $author := . -}} {{- if gt $i 0 }} · {{ end -}} {{- end }}

{{ end }} {{ with $date }}

{{ end }} {{ with $time }}

{{ . }} {{ i18n "paige_minutes" . }}

{{ end }}
{{ end }} {{ with $alert }} {{ end }} {{ if $toc }}
{{ $page.TableOfContents }}
{{ end }} {{ partial "paige/func-include.html" (dict "name" "page-header-last%s.html" "page" $page) }}
{{ end }}