phiax-hugo-theme/layouts/_partials/terms.html
2026-01-24 20:28:16 +01:00

18 lines
524 B
HTML

{{- /*
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 . }}
<div class="article-end-ribbon">Tags: <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></div>
{{- end }}
{{- end }}