mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-24 03:36:53 -04:00
author(partial): init, with support for multiple authors
* usage: author: ["me", "you"]
This commit is contained in:
parent
3e84ff0435
commit
bc2b82c370
1 changed files with 9 additions and 0 deletions
9
layouts/partials/author.html
Normal file
9
layouts/partials/author.html
Normal 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 -}}
|
Loading…
Add table
Add a link
Reference in a new issue