PaperMod's author.html expects params.author to be a string, but our config uses a map with name and email (needed for RSS). Add a reflect.IsMap check to extract .name for display, matching how the updated PaperMod RSS template already handles the map format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
11 lines
346 B
HTML
11 lines
346 B
HTML
{{- if or .Params.author site.Params.author }}
|
|
{{- $author := (.Params.author | default site.Params.author) }}
|
|
{{- if reflect.IsMap $author }}
|
|
{{- $author.name }}
|
|
{{- else if (or (eq (printf "%T" $author) "[]string") (eq (printf "%T" $author) "[]interface {}")) }}
|
|
{{- (delimit $author ", " ) }}
|
|
{{- else }}
|
|
{{- $author }}
|
|
{{- end }}
|
|
{{- end -}}
|