From dad1ec93fd352da185ef6f431588250af1d48ec5 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Fri, 27 Dec 2024 04:18:35 +0100 Subject: Author card at post end --- layouts/_default/single.html | 10 +++++++++- layouts/partials/author_card.html | 10 +++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 57010cc..cad6a35 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -25,7 +25,15 @@ {{ end }}
{{ if in (slice "post" "talk") .Section }} - {{ partial "author_card" .Site.Params.Author }} + {{ range .Params.authors }} + {{ $name := . }} + {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }} + {{ with $.GetPage $path }} + {{ if .File }} + {{ partial "author_card" (merge .Params (dict "path" $path )) }} + {{ end }} + {{ end }} + {{ end }} {{ end }} {{ partial "post_pager" . }}
diff --git a/layouts/partials/author_card.html b/layouts/partials/author_card.html index c2bbeab..e74ee98 100644 --- a/layouts/partials/author_card.html +++ b/layouts/partials/author_card.html @@ -3,14 +3,10 @@ {{ .name }}
-
- {{ with .homepage }} - - {{ $.name }} - - {{ else }} +
+ {{ .name }} - {{ end }} +
{{ .role | markdownify }}

-- cgit v1.2.3