anatole-porzh/layouts/partials/taxonomy/template.html
2025-10-09 10:23:36 +02:00

13 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>