summaryrefslogtreecommitdiffstats
path: root/layouts/partials/author.html
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 14:00:11 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 14:00:11 +0200
commit0bde219bfe062ee6018196c385b42613489862dc (patch)
treecae4a54c3e2a429ae5bf30eb9dd9776da42a809a /layouts/partials/author.html
parentb62e7ccc1f021339863bb14521e99ea57127dc38 (diff)
downloadgohugo-theme-ed-0bde219bfe062ee6018196c385b42613489862dc.tar.gz
Update author partial
Diffstat (limited to 'layouts/partials/author.html')
-rw-r--r--layouts/partials/author.html28
1 files changed, 12 insertions, 16 deletions
diff --git a/layouts/partials/author.html b/layouts/partials/author.html
index efb1dbd..ccad7e7 100644
--- a/layouts/partials/author.html
+++ b/layouts/partials/author.html
@@ -6,23 +6,19 @@
{{- else }}
{{- .Params.author }}
{{- end }}
-
{{- /* Otherwise, get site authors */}}
-{{- else }}
- {{- if site.Author }}
- {{- $author_type := (printf "%T" site.Author) }}
- {{- if (or (eq $author_type "map[string]string") (eq $author_type "map[string]interface {}")) }}
- {{- range $i, $author := site.Author }}
- {{- $name_type := (printf "%T" $author) }}
- {{- if (eq $name_type "maps.Params") }}
- {{- with $author.name }}{{ $.Scratch.SetInMap "names" . . }}{{ end }}
- {{- else }}
- {{- $.Scratch.SetInMap "names" site.Author.name site.Author.name }}
- {{- break -}}
- {{- end }}
+{{- else if site.Author }}
+ {{- $author_type := (printf "%T" site.Author) }}
+ {{- if (or (eq $author_type "map[string]string") (eq $author_type "map[string]interface {}")) }}
+ {{- range $i, $author := site.Author }}
+ {{- if (eq (printf "%T" $author) "maps.Params") }}
+ {{- with $author.name }}{{ $.Scratch.SetInMap "names" . . }}{{ end }}
+ {{- else }}
+ {{- $.Scratch.SetInMap "names" site.Author.name site.Author.name }}
+ {{- break -}}
{{- end }}
- {{- delimit ($.Scratch.GetSortedMapValues "names") ", " }}
- {{- $.Scratch.Delete "names" -}}
{{- end }}
- {{- end -}}
+ {{- delimit ($.Scratch.GetSortedMapValues "names") ", " }}
+ {{- $.Scratch.Delete "names" -}}
+ {{- end }}
{{- end -}}