From: Kai Moritz Date: Sun, 30 Nov 2025 12:27:37 +0000 (+0100) Subject: WIP:thymeleaf:taxonomies-on-page X-Git-Tag: hugo--mein-erstes-partial~30 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=63a80bd7282844a602bb3ce3536e8147473d99de;p=website WIP:thymeleaf:taxonomies-on-page --- diff --git a/hugo/themes/thymeleaf/layouts/_partials/terms.html b/hugo/themes/thymeleaf/layouts/_partials/terms.html index 3e43c531..952719d8 100644 --- a/hugo/themes/thymeleaf/layouts/_partials/terms.html +++ b/hugo/themes/thymeleaf/layouts/_partials/terms.html @@ -1,53 +1,11 @@ -{{- /* -For a given taxonomy, renders a list of terms assigned to the page. - -@context {page} page The current page. -@context {string} taxonomy The taxonomy. - -@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} -*/}} - -{{- $page := .page }} -{{- $taxonomy := .taxonomy }} - -{{- with $page.GetTerms $taxonomy }} - {{- $label := (index . 0).Parent.LinkTitle }} -
-
{{ $label }}:
- -
+{{- with .Page.Site.Taxonomies }} +{{- range $taxonomy, $terms := . }} +

$taxonomy

+
{{ debug.Dump $taxonomy }}
+

$terms

+
{{ debug.Dump $terms }}
+{{- end }} {{- end }} -

.Site

-
{{ debug.Dump .Site }}
-

.

-
{{ debug.Dump . }}
-

.page

-
{{ debug.Dump .page }}
-

.Page.Page

-
{{ debug.Dump .Page.Page }}
-

.tags

-
{{ debug.Dump .tags }}
-

$taxonomy

-
{{ debug.Dump $taxonomy }}
- {{- $taxonomyObject := .page.Site.Taxonomies.tags }} -
{{ debug.Dump $taxonomyObject }}
- {{- $type := $taxonomyObject.Type }} -
{{ debug.Dump $type }}
- {{- define "custom_css" }}