hugo-theme-wondermod/layouts/partials/author.html
Aditya Telange 9ac0f391f6
author(partial): fix multiple authors in config displayed incorrectly
* is of type `[]interface {}` and not `[]string`
2020-10-25 13:01:49 +05:30

10 lines
318 B
HTML

{{- if or .Params.author .Site.Params.author }}
{{- $author := (.Params.author | default .Site.Params.author)}}
{{- $author_type := (printf "%T" $author) }}
{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}") ) }}
{{- (delimit $author ", " ) }}
{{- else }}
{{- $author }}
{{- end }}
{{- end -}}