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 -}}