File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{{- $scratch := newScratch }}
22
33{{- if not .Date.IsZero -}}
4- {{- $scratch.Add "meta" (slice (printf "< span title ='%s '> %s</ span > " (.Date) (.Date | time.Format (default ":date_long" site.Params.DateFormat)))) }}
4+ {{- $scratch.Add "meta" (slice (printf "< span title ='%s '> %s</ span > " (.Date) (.Date | time.Format (default ":date_long" site.Params.DateFormat)))) }}
55{{- end }}
66
77{{- if (.Param "ShowReadingTime") -}}
8- {{- $scratch.Add "meta" (slice (printf "< span > %s</ span > " (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)))) }}
8+ {{- $scratch.Add "meta" (slice (printf "< span > %s</ span > " (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)))) }}
99{{- end }}
1010
1111{{- if (.Param "ShowWordCount") -}}
12- {{- $scratch.Add "meta" (slice (printf "< span > %s</ span > " (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }}
12+ {{- $scratch.Add "meta" (slice (printf "< span > %s</ span > " (i18n "words" .WordCount | default (printf "%d words" .WordCount)))) }}
1313{{- end }}
1414
1515{{- if not (.Param "hideAuthor") -}}
16- {{- with (partial "author.html" .) }}
17- {{- $scratch.Add "meta" (slice (printf "< span > %s</ span > " .)) }}
18- {{- end }}
16+ {{- with (partial "author.html" .) }}
17+ {{- $scratch.Add "meta" (slice (printf "< span > %s</ span > " .)) }}
18+ {{- end }}
1919{{- end }}
2020
21+ {{/* Combine all meta information into a single string with separators and render it as HTML.*/}}
22+
2123{{- with ($scratch.Get "meta") }}
22- {{- delimit . " · " | safeHTML -}}
24+ {{- delimit . " · " | safeHTML -}}
2325{{- end -}}
You can’t perform that action at this time.
0 commit comments