phiax-hugo-theme/layouts/_partials/terms.html
2026-01-26 19:44:08 +01:00

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