diff --git a/modules/blox/layouts/_partials/page_metadata_authors.html b/modules/blox/layouts/_partials/page_metadata_authors.html index d563cb69..8583628a 100644 --- a/modules/blox/layouts/_partials/page_metadata_authors.html +++ b/modules/blox/layouts/_partials/page_metadata_authors.html @@ -1,16 +1,23 @@ {{/* Display author list. */}} -{{ if .Params.authors }} - {{ range $index, $term := (.GetTerms "authors") }} - {{- $slug := $term.Data.Term | urlize -}} - {{- $profile := partial "functions/get_author_profile" (dict "slug" $slug) -}} - {{- $display := $profile.title | default $term.LinkTitle -}} +{{- $authors := .Params.authors -}} + +{{ if $authors }} + {{- if not (reflect.IsSlice $authors) -}} + {{- $authors = slice $authors -}} + {{- end -}} + + {{ range $index, $raw := $authors }} + {{- $slug := $raw | urlize -}} + {{- $profile := partial "functions/get_author_profile" (dict "slug" $slug "title" $raw) -}} + {{- $termPage := site.GetPage (printf "/authors/%s" $slug) -}} + {{- $display := $profile.title | default $raw -}} {{- $highlight_name := false -}} {{- if gt $index 0 }}, {{ end -}} - {{- if $term.RelPermalink -}} - {{ $display }} + {{- if $termPage -}} + {{ $display }} {{- else -}} {{ $display }} {{- end -}}