]> juplo.de Git - website/commitdiff
WIP:thymeleaf:taxonomies-on-page
authorKai Moritz <kai@juplo.de>
Tue, 2 Dec 2025 17:49:58 +0000 (18:49 +0100)
committerKai Moritz <kai@juplo.de>
Wed, 3 Dec 2025 18:58:03 +0000 (19:58 +0100)
hugo/themes/thymeleaf/layouts/_partials/terms.html
hugo/themes/thymeleaf/layouts/page.html

index d1db8fa58b04cd10502e3c35c24fe82935c3179d..56b00675d3455c74d6703e141d8f2d6e2ed07e02 100644 (file)
@@ -1,12 +1,15 @@
 {{- range $taxonomy, $terms := .Page.Site.Taxonomies }}
 <h3><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a></h3>
 <div>$taxonomy: {{ $taxonomy }}</div>
-<div>
-.Page.GetTerms $taxonomy:
-{{- with $pageterms := .Page.GetTerms $taxonomy }}
-<pre>{{ debug.Dump $pageterms }}</pre>
+<h4>.Page</h4>
+{{- with .Page }}
+<pre>{{ debug.Dump . }}</pre>
 {{- end }}
-</div>
+<h4>.Page.GetTerms $taxonomy</h4>
+{{- with .Page.Page.GetTerms "categories" }}
+<pre>{{ debug.Dump . }}</pre>
+{{- end }}
+<h4>List</h4>
 <ul>
   {{- range $terms }}
   <li>{{ . }}</li>
index 701ded254ea0b6ff6e6d61989df381b7ac77345b..77f1c656e7fb97daab626ede7d8c244e5444a6b9 100644 (file)
@@ -7,6 +7,10 @@
 
   {{ .Content }}
   {{ partial "terms.html" . }}
+<h4>.Page</h4>
+{{- with .Page }}
+<pre>{{ debug.Dump . }}</pre>
+{{- end }}
 <div>
 .GetTerms "categories":
 {{- with .GetTerms "categories" }}