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