diff --git a/layouts/partials/page_metadata_authors.html b/layouts/partials/page_metadata_authors.html index 437e1653..877e41f2 100644 --- a/layouts/partials/page_metadata_authors.html +++ b/layouts/partials/page_metadata_authors.html @@ -1,18 +1,17 @@ {{/* Display author list. */}} {{- $taxonomy := "authors" }} -{{ if .Param $taxonomy }} +{{ with .Param $taxonomy }} {{ $link_authors := site.Params.link_authors | default true }} - {{ range $index, $value := (.GetTerms $taxonomy) }} - {{- /* Check if a profile was created for this user. */ -}} - {{- $profile_page := isset .Page.Params "superuser" -}} - + {{ range $index, $name_raw := . }} + {{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy .) -}} + {{- $name := $profile_page.Title | default $name_raw -}} {{- if gt $index 0 }}, {{ end -}} {{- if and $profile_page $link_authors -}} - {{ .LinkTitle }} + {{$name}} {{- else -}} - {{ .LinkTitle }} + {{$name}} {{- end -}} {{- end -}}