From 70c5a2b6fb60bd90e7780fa220bfe146141d00e2 Mon Sep 17 00:00:00 2001 From: yingyu5658 Date: Fri, 1 Aug 2025 21:30:53 +0800 Subject: Initial commit --- layouts/partials/terms.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 layouts/partials/terms.html (limited to 'layouts/partials/terms.html') diff --git a/layouts/partials/terms.html b/layouts/partials/terms.html new file mode 100644 index 0000000..02bf412 --- /dev/null +++ b/layouts/partials/terms.html @@ -0,0 +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 }} +
+ {{- range . }} + #{{ .LinkTitle }} + {{- end }} +
+{{- end }} -- cgit v1.2.3