From edf690072e871a3e6acd84b8e9fb84483fdebdc2 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Fri, 27 Dec 2024 04:01:34 +0100 Subject: Track author taxonomy --- layouts/partials/hero.html | 18 ++++++------------ layouts/partials/metadata.html | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html index 3008ef2..1654b5d 100644 --- a/layouts/partials/hero.html +++ b/layouts/partials/hero.html @@ -6,7 +6,7 @@ {{ end }};" >
- {{ if eq .Type "about" }} + {{ if eq .Type "authors" }} {{ $avatar := index .Params.images 1 }} {{ if hasPrefix $avatar "http" }} {{ $avatar = resources.GetRemote $avatar }} @@ -17,14 +17,12 @@ {{ end }}

- {{ .Title }} + {{ .Params.Name }}

- {{ if .Params.personal }} -

- {{ .Site.Params.Author.role | markdownify }} -

- {{ end }} +

+ {{ .Params.role | markdownify }} +

{{ with .Params.Subtitle }}

@@ -34,11 +32,7 @@
- {{ if .Params.personal }} - {{ partial "social_links" .Site.Params.Author }} - {{ else }} - {{ partial "social_links" .Site.Params }} - {{ end }} + {{ partial "social_links" .Params }}
{{ else }} diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index b2136bc..28dc5b4 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -1,9 +1,19 @@ {{ $dateTime := .PublishDate.Format "2006-01-02" }} {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
- By - {{ with .Params.author }} - — {{ delimit . ", " }} + By — + {{ range .Params.authors }} + {{ $name := . }} + {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }} + {{ with $.GetPage $path }} + {{ if isset .Params "name" }} + + {{- default $name .Params.name -}} + + {{ else }} + {{ $name }} + {{ end }} + {{ end }} {{ end }} -- cgit v1.2.3