From e928a38909d83602ffdc9c64b6eeb7aecf8eb443 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 1 May 2022 00:54:32 +0200 Subject: Add author partial --- layouts/partials/author.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 layouts/partials/author.html (limited to 'layouts/partials/author.html') diff --git a/layouts/partials/author.html b/layouts/partials/author.html new file mode 100644 index 0000000..8f2758f --- /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 (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }} +{{- (delimit $author ", " ) }} +{{- else }} +{{- $author }} +{{- end }} +{{- end -}} -- cgit v1.2.3