From: Kai Moritz Date: Sat, 22 Nov 2025 15:12:02 +0000 (+0100) Subject: WIP:refactor: display terms as term/number-buttons X-Git-Tag: hugo--cat-tag-pages~11 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=649e9b6490e3cc3d67fd2f657c655f2f0da0982a;p=website WIP:refactor: display terms as term/number-buttons --- diff --git a/hugo/themes/thymeleaf/layouts/_partials/terms.html b/hugo/themes/thymeleaf/layouts/_partials/terms.html index 8a6ebec2..6fd26540 100644 --- a/hugo/themes/thymeleaf/layouts/_partials/terms.html +++ b/hugo/themes/thymeleaf/layouts/_partials/terms.html @@ -1,23 +1,27 @@ -{{- /* -For a given taxonomy, renders a list of terms assigned to the page. +{{- define "main" }} -@context {page} page The current page. -@context {string} taxonomy The taxonomy. - -@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} -*/}} +{{- if .Title }} + +{{- end }} -{{- $page := .page }} -{{- $taxonomy := .taxonomy }} + -{{- with $page.GetTerms $taxonomy }} - {{- $label := (index . 0).Parent.LinkTitle }} -
-
{{ $label }}:
- -
-{{- end }} +{{- end }}{{/* end main */ -}}