blob: afe3a14bc64bad3be0bbf9a9ea5c0c5bd4c90711 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{{- /*
For a given taxonomy, renders a comma-separated list of terms assigned to the page.
@context {string} taxonomy The taxonomy.
@context {page} page The current page.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $taxonomy := .taxonomy }}
{{- $page := .page }}
{{- with $page.GetTerms $taxonomy -}}
{{- range $index, $term := . -}}
{{- if $index }}, {{ end -}}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{- end -}}
{{- end -}}
|