Use individual <a> for each tag/category/etc in post metadata

Fixes #85
This commit is contained in:
2025-08-09 22:34:11 -05:00
parent 67de113bdf
commit 3d55a7dabe
5 changed files with 24 additions and 25 deletions

View File

@@ -1,16 +1,9 @@
{{ with .Params.authors }}
<span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
{{ with .GetTerms "authors" }}
<span class="page-metadata-item authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
{{ partial "icon.html" "user-circle" }}
{{ if index $.Site.Taxonomies "authors" }}
{{ $authors := slice }}
{{ range . }}
{{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }}
{{ $authors = $authors | append (printf `<a href="%s">%s</a>` $url .) }}
{{ end }}
{{ delimit $authors ", " | safeHTML }}
{{ else }}
{{ delimit . ", " }}
{{ range . }}
<a href="{{ .Permalink }}" data-pagefind-filter="author">{{ .LinkTitle }}</a>
{{ end }}
</span>
{{ end }}