From 8ada21c6097b16d07e8d0035e2be8f7befe8d90c Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 6 Nov 2021 19:12:56 -0500 Subject: [PATCH] If authors taxonomy is enabled, link to it in metadata --- layouts/partials/post-metadata.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html index 48b56b8..b539638 100644 --- a/layouts/partials/post-metadata.html +++ b/layouts/partials/post-metadata.html @@ -27,7 +27,20 @@ {{ with .Params.authors }} {{ partial "icon.html" "user-circle" }} + + {{ if index $.Site.Taxonomies "authors" }} + + {{ $authors := slice }} + {{ range . }} + {{ $url := (printf "/authors/%s" (. | anchorize)) | absLangURL }} + {{ $authors = $authors | append (printf `%s` $url . | safeHTML) }} + {{ end }} + {{ delimit $authors ", " }} + + {{ else }} {{ delimit . ", " }} + + {{ end }} {{ end }}