File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 1+ {{- if or .Params.author site.Params.author }}
2+ {{- $author := (.Params.author | default site.Params.author) }}
3+ {{- $author_type := (printf "%T" $author) }}
4+ {{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }}
5+ {{- (delimit $author ", " ) }}
6+ {{- else }}
7+ {{- $author }}
8+ {{- end }}
9+ {{- end -}}
Original file line number Diff line number Diff line change 11{{- $scratch := newScratch }}
2+ {{- $scratch.Set "meta" slice -}}
23
34{{- $timeFormat := default "January 2, 2006" site.Params.DateFormat -}}
45
56{{- if not .Date.IsZero -}}
67{{- $rawDate := .Date.Format "2006-01-02T15:04:05Z07:00" -}}
78{{- $formatted := .Date | time.Format $timeFormat -}}
89{{- $text := printf (i18n "created_date") $formatted -}}
9- {{- $html := printf `< span title ="%s "> %s</ span > ` $rawDate $text | safeHTML -}}
10- {{- $scratch.Add "meta" (slice $html) -}}
10+ {{- $scratch.Add "meta" (printf `< span title ="%s "> %s</ span > ` $rawDate $text) -}}
1111{{- end -}}
1212
1313{{- if (.Param "ShowLastMod") -}}
1414{{- $rawLastmod := .Lastmod.Format "2006-01-02T15:04:05Z07:00" -}}
1515{{- $formatted := .Lastmod | time.Format $timeFormat -}}
1616{{- $text := printf (i18n "modified_date") $formatted -}}
17- {{- $html := printf `< span title ="%s "> %s</ span > ` $rawLastmod $text | safeHTML -}}
18- {{- $scratch.Add "meta" (slice $html) -}}
19- {{- end }}
17+ {{- $scratch.Add "meta" (printf `< span title ="%s "> %s</ span > ` $rawLastmod $text) -}}
18+ {{- end -}}
2019
2120{{- if (.Param "ShowReadingTime") -}}
2221{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
3433
3534{{- with ($scratch.Get "meta") }}
3635{{- delimit . " · " | safeHTML -}}
37- {{- end -}}
36+ {{- end -}}
You can’t perform that action at this time.
0 commit comments