{{- $scratch := newScratch }} {{- if not .Lastmod.IsZero -}} {{ $author := "" }} {{ with .GitInfo }} {{ $author = .AuthorName }} {{ end}} {{/* copy van author.html shortcode - want die kun je niet aanroepen van een partial */}} {{- range $a := .Site.Data.cncz.authors }} {{- if eq $a.name $author }} {{- if isset $a "url" }} {{ $author = printf "%s" ($a.url) ($a.name | title) }} {{- else }} {{ $author = printf "%s" ( $a.displayName | urlquery ) ($a.name | title) }} {{- end }} {{- end }} {{- end }} {{- $scratch.Add "meta" (slice (printf "%s %s %s %s" (.Lastmod) (i18n "updated" | title ) (.Lastmod | time.Format (default "Jan 2, 2006" site.Params.DateFormat)) " · " ($author))) }} {{- end }} {{- if (.Param "ShowReadingTime") -}} {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }} {{- end }} {{- if (.Param "ShowWordCount") -}} {{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} {{- end }} {{- if not .Date.IsZero -}} {{- $scratch.Add "meta" (slice (printf "%s %s" (i18n "created" | title ) (.Date) (.Date | time.Format (default "Jan 2, 2006" site.Params.DateFormat)))) }} {{- end }} {{- with (partial "author.html" .) }} {{- $scratch.Add "meta" (slice .) }} {{- end }} {{- with ($scratch.Get "meta") }} {{- delimit . " · " | safeHTML -}} {{- end -}}