summaryrefslogtreecommitdiff
path: root/themes/new_theme/layouts/partials/post_meta/categories.html
blob: 8ab4202333ffe7e97e64b715840177e8a4491c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{- $taxo := "categories" -}}
{{- with .Param $taxo -}}
<div class="meta__item-categories meta__item">
	{{- partial "svg/category.svg" (dict "class" "meta__icon") -}}
	<span class="meta__text">
		{{- range $index, $category := . }}
			{{- $url := urls.Parse ($category | urlize) -}}
			{{- $path := $url.Path -}}
			{{- with $.Site.GetPage (printf "/%s/%s" $taxo $path) }}
				{{- if gt $index 0 }}, {{ end -}}
				<a class="meta__link" href="{{ .RelPermalink }}" rel="category">{{ .Title }}</a>
			{{- end }}
		{{- end }}
	</span>
</div>
{{- end }}