From 63a80bd7282844a602bb3ce3536e8147473d99de Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 30 Nov 2025 13:27:37 +0100 Subject: [PATCH] WIP:thymeleaf:taxonomies-on-page --- .../thymeleaf/layouts/_partials/terms.html | 56 +++---------------- hugo/themes/thymeleaf/layouts/page.html | 5 +- 2 files changed, 8 insertions(+), 53 deletions(-) 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" }}