Add class to taxonomies.

This commit is contained in:
tastytea 2019-11-20 23:23:16 +01:00
parent 70c106d68f
commit 1b8f62d55d
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 8 additions and 6 deletions

View File

@ -6,13 +6,15 @@
{{- range $taxo := (slice "Categories" "Series" "Tags") }}
{{- $elems := $.Param $taxo }}
{{- if $elems }}
{{ $taxo }}: [
<span class="{{ (lower $taxo) }}">
{{ $taxo }}: &#x5b;
{{- range $name := $elems }}
{{- with $.Site.GetPage (lower (printf "/%s/%s" $taxo (urlize $name))) }}
<a href="{{ .Permalink }}">{{ $name }}</a>
{{- end }}
{{- with $.Site.GetPage (lower (printf "/%s/%s" $taxo (urlize $name))) }}
<a href="{{ .Permalink }}">{{ $name }}</a>
{{- end }}
&#x5d;
{{- end }}
{{- end }}
&#x5d;
</span>
{{- end }}
{{- end }}
</div>