Override PaperMod author partial to handle map format
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>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
8ff7fb63e6
commit
433d2b6ad4
@@ -0,0 +1,10 @@
|
||||
{{- 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 -}}
|
||||
Reference in New Issue
Block a user