From ae338f0ba0fb5618627249da64c7e2ef7aa25c8a Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 7 Jan 2026 20:21:14 +0000 Subject: [PATCH] feat(authors): preserve entered casing and links for author names - keep raw front-matter author strings as preferred display when no profile exists - fall back to title-cased humanized slug only as last resort to avoid lowercase initials - render authors directly from Params order and resolve links via taxonomy pages when present Fix https://discord.com/channels/722225264733716590/1457522006462435541/1458539152160067784 --- .../_partials/page_metadata_authors.html | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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 -}}