mirror of
https://git.theinfopunk.com/punk/thewwwdotcom-blog.git
synced 2024-10-22 21:20:16 -04:00
14 lines
450 B
HTML
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>
|