diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-10-25 12:15:51 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-10-25 12:16:36 +0530 |
| commit | bc2b82c370be7a5554cd886033b3e3e0d21bdea2 (patch) | |
| tree | 36df77d64db2164ce7022e8777d527962c6d7bb4 | |
| parent | 3e84ff0435684f578969929385a727712630a89a (diff) | |
author(partial): init, with support for multiple authors
* usage:
author: ["me", "you"]
| -rw-r--r-- | layouts/partials/author.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/partials/author.html b/layouts/partials/author.html new file mode 100644 index 0000000..f91a116 --- /dev/null +++ b/layouts/partials/author.html @@ -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 -}} |
