From 935fe4ab40d1f95a9329c2853c1786fdfc0e3209 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 2 Dec 2025 19:01:03 +0100 Subject: [PATCH] WIP:thymeleaf:taxonomies-on-page --- .../thymeleaf/layouts/_partials/terms.html | 10 +++++----- hugo/themes/thymeleaf/layouts/page.html | 16 ---------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/hugo/themes/thymeleaf/layouts/_partials/terms.html b/hugo/themes/thymeleaf/layouts/_partials/terms.html index 56b00675..8d660096 100644 --- a/hugo/themes/thymeleaf/layouts/_partials/terms.html +++ b/hugo/themes/thymeleaf/layouts/_partials/terms.html @@ -1,12 +1,11 @@ +{{- with $page := .Page }} {{- range $taxonomy, $terms := .Page.Site.Taxonomies }}

{{ .Page.LinkTitle }}

$taxonomy: {{ $taxonomy }}

.Page

-{{- with .Page }} -
{{ debug.Dump . }}
-{{- end }} -

.Page.GetTerms $taxonomy

-{{- with .Page.Page.GetTerms "categories" }} +
{{ debug.Dump $page }}
+

$page.GetTerms

+{{- with $page.GetTerms $taxonomy }}
{{ debug.Dump . }}
{{- end }}

List

@@ -19,3 +18,4 @@ {{- end }} {{- end }} +{{- end }} diff --git a/hugo/themes/thymeleaf/layouts/page.html b/hugo/themes/thymeleaf/layouts/page.html index 77f1c656..1f53ceb9 100644 --- a/hugo/themes/thymeleaf/layouts/page.html +++ b/hugo/themes/thymeleaf/layouts/page.html @@ -7,20 +7,4 @@ {{ .Content }} {{ partial "terms.html" . }} -

.Page

-{{- with .Page }} -
{{ debug.Dump . }}
-{{- end }} -
-.GetTerms "categories": -{{- with .GetTerms "categories" }} -
{{ debug.Dump . }}
-{{- end }} -
-
-.GetTerms "tags": -{{- with .GetTerms "tags" }} -
{{ debug.Dump . }}
-{{- end }} -
{{ end }} -- 2.39.5