summaryrefslogtreecommitdiffstats
path: root/layouts/partials/author.html
blob: 4ca1209274ae465416e2e9e11b0a178e46d90e71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{{- $siteAuthor := partial "site-author.html" . -}}

{{- /* First, check for current page author(s) */}}
{{- if .Params.author }}
    {{- $author_type := (printf "%T" .Params.author) }}
    {{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }}
        {{- (delimit .Params.author ", " ) }}
    {{- else }}
        {{- .Params.author }}
    {{- end }}
{{- /* Otherwise, get site authors */}}
{{- else if $siteAuthor.name }}
    {{- $siteAuthor.name }}
{{- end -}}