From f187433b11ecd2bbd5cda30ced678df1ab4003b5 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sat, 20 Jun 2026 19:27:11 -0700 Subject: [PATCH] feat(articles): add "About the Author" section sourced from profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Render a rich author card at the bottom of article/podcast pages for each credited author who has opted into a profile — avatar, preferred name, tagline, bio, social links, and a link through to the full profile. Articles by un-enriched authors are unchanged. Replaces the unused per-article `author_bio` block (0 articles used it) with the profile-sourced partial, reusing author-avatar and author-links. Co-Authored-By: Claude Opus 4.8 --- .../layouts/_default/single.html | 18 +-------- .../partials/article-author-about.html | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 themes/powershell-community/layouts/partials/article-author-about.html diff --git a/themes/powershell-community/layouts/_default/single.html b/themes/powershell-community/layouts/_default/single.html index e8aea091e..7d45250f1 100644 --- a/themes/powershell-community/layouts/_default/single.html +++ b/themes/powershell-community/layouts/_default/single.html @@ -118,22 +118,8 @@

Tags

{{ end }} - - {{ with .Params.author_bio }} -
-
-
-
- -
-
-

About {{ $.Params.author }}

-

{{ . }}

-
-
-
-
- {{ end }} + + {{ partial "article-author-about.html" . }} {{ $related := .Site.RegularPages.Related . | first 3 }} diff --git a/themes/powershell-community/layouts/partials/article-author-about.html b/themes/powershell-community/layouts/partials/article-author-about.html new file mode 100644 index 000000000..3ca6c3e3b --- /dev/null +++ b/themes/powershell-community/layouts/partials/article-author-about.html @@ -0,0 +1,37 @@ +{{- /* + "About the Author" section for article/single pages, sourced from each credited + author's profile (taxonomy term content file). Renders only for authors who have + opted into a profile, so articles by un-enriched authors are unchanged. +*/ -}} +{{- $enriched := slice -}} +{{- with .GetTerms "authors" -}} + {{- range . -}} + {{- if .File -}}{{- $enriched = $enriched | append . -}}{{- end -}} + {{- end -}} +{{- end -}} +{{- with $enriched -}} +
+

About the Author{{ if gt (len .) 1 }}s{{ end }}

+
+ {{- range . -}} + {{- $display := .Title -}}{{- with .Params.preferred_name -}}{{- $display = . -}}{{- end -}} +
+
+ {{ partial "author-avatar.html" (dict "page" . "name" .Title "size" 96 "class" "w-16 h-16 rounded-full object-cover ring-2 ring-blue-100 shrink-0") }} +
+

+ {{ $display }} +

+ {{ with .Params.tagline }}

{{ . }}

{{ end }} + {{ with .Content }}
{{ . }}
{{ end }} + {{ partial "author-links.html" (dict "page" . "class" "flex gap-4 text-lg mt-3") }} + + View profile + +
+
+
+ {{- end -}} +
+
+{{- end -}}