thewwwdotcom-blog/themes/anatole/layouts/partials/taxonomy/template.html
2024-10-17 11:07:52 +02:00

14 lines
450 B
HTML

{{- $linkClass := .linkClass -}}
{{- $linkBase := .linkBase -}}
<span>
{{- range $index, $el := .items -}}
<!-- Replace certain special characters with their URL encoded counterparts -->
{{- $item := replace . "#" "%23" -}}
{{- $item = replace $item "." "%2e" -}}
{{- $link := ( printf "%s/%s/" $linkBase ( $item | urlize ) ) | relLangURL -}}
<a class="{{ $linkClass }}" href="{{ $link }}">{{- . -}}</a>
{{- end -}}
</span>