author(partial): init, with support for multiple authors

* usage:
    author: ["me", "you"]
This commit is contained in:
Aditya Telange 2020-10-25 12:15:51 +05:30
parent 3e84ff0435
commit bc2b82c370
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 9 additions and 0 deletions

View File

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