From 49458f5ffd5a48c465117ec27f6437683f75acc1 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sat, 31 Jan 2026 20:38:50 +0300 Subject: initial --- themes/neonxp/layouts/_partials/terms.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 themes/neonxp/layouts/_partials/terms.html (limited to 'themes/neonxp/layouts/_partials/terms.html') diff --git a/themes/neonxp/layouts/_partials/terms.html b/themes/neonxp/layouts/_partials/terms.html new file mode 100644 index 0000000..f826abb --- /dev/null +++ b/themes/neonxp/layouts/_partials/terms.html @@ -0,0 +1,27 @@ +{{- /* +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 }} +{{- if . }} +
+ {{- $label := (index . 0).Parent.LinkTitle }} +
+

{{ $label }}:

+ +
+ {{- end }} +
+{{- end }} \ No newline at end of file -- cgit v1.2.3