summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 -}}