cach-radio/inc/themes/castanet/layouts/partials/categories.html

9 lines
337 B
HTML
Raw Permalink Normal View History

2022-12-15 22:36:40 +01:00
{{ $taxonomy := "categories" }} {{ with .Param $taxonomy }}
{{ $len := (len .) }}
{{ range $index, $tag := . }}
{{ $urlTag := $tag | urlize }}
{{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $urlTag) -}}
<a href="{{ .Permalink }}">{{ $tag }}</a>{{ cond (eq (add $index 1) $len) "" ", " }}
{{- end -}}{{- end -}}
{{ end }}