From 3b2bc69e22bd795f5b88cf6e7c14fa2a11feb753 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 30 Nov 2025 09:11:06 +0100 Subject: [PATCH] =?utf8?q?Partial=20`terms.html`=20=C3=BCberarbeitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- layouts/_partials/terms.html | 38 +++++++++++++++--------------------- layouts/page.html | 4 +++- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/layouts/_partials/terms.html b/layouts/_partials/terms.html index 8a6ebec2..a10e59ec 100644 --- a/layouts/_partials/terms.html +++ b/layouts/_partials/terms.html @@ -1,23 +1,17 @@ -{{- /* -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 }}:
- -
+ diff --git a/layouts/page.html b/layouts/page.html index 30fcf482..e6b6060b 100644 --- a/layouts/page.html +++ b/layouts/page.html @@ -4,5 +4,7 @@ {{ .Content }} - {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +{{ end }} +{{ define "marginalcontent" }} + {{ partial "terms.html" . }} {{ end }} -- 2.39.5