{{ $is_list := .is_list }} {{ $share := .share | default false }} {{ $ := .content }}
{{/* If `authors` is set and is not empty. */}} {{ if $.Params.authors }} {{ $authorLen := len $.Params.authors }} {{ if gt $authorLen 0 }}
{{ partial "page_metadata_authors" $ }}
{{ end }} {{ end }} {{ if not (in (slice "talk" "page") $.Type) }} {{ $date := $.Lastmod.Format $.Site.Params.date_format }} {{ if eq $.Type "publication" }} {{ $date = $.Date.Format ($.Site.Params.publications.date_format | default "January, 2006") }} {{ else }} {{ if ne $.Params.Lastmod $.Params.Date }} {{ i18n "last_updated" }} {{ end }} {{ end }} {{ end }} {{ if and (eq $is_list 1) (eq $.Type "publication") }} {{ if $.Params.publication_short }} {{ $.Params.publication_short | markdownify }} {{ else if $.Params.publication }} {{ $.Params.publication | markdownify }} {{ end }} {{ end }} {{ if and (eq $.Type "post") (not (or (eq $.Site.Params.reading_time false) (eq $.Params.reading_time false))) }} {{ $.ReadingTime }} {{ i18n "minute_read" }} {{ end }} {{ $comments_enabled := and $.Site.DisqusShortname (not (or $.Site.Params.disable_comments (eq $.Params.comments false))) }} {{ if and $comments_enabled ($.Site.Params.comment_count | default true) }} {{ end}} {{ if $.Params.categories }} {{ $categoriesLen := len $.Params.categories }} {{ if gt $categoriesLen 0 }} {{ range $k, $v := $.Params.categories }} {{ . }} {{- if lt $k (sub $categoriesLen 1) -}}, {{ end }} {{ end }} {{ end }} {{ end }} {{ if $share }} {{ partial "share.html" $ }} {{ end }}