Ronalds Vilciņš


Delimiter separated tags in Hugo

The example below uses tags with comma as delimiter.

<strong>{{ Tags: }}</strong>
{{ range $key, $value := .Params.tags }}
   <a href="/tags/{{ $value | urlize }}">{{ $value }}</a>{{ if ne $key (sub (len $.Params.tags) 1) }}, {{ else }}{{ end }}
{{ end }}



This site is ad-free and doesn’t use trackers. If you’d like to support my writing, I’d love if you could buy me a coffee.