Comma-separated tags in Hugo

Rendering a list of tag links is easy until you need commas between them but not after the last one. This Hugo template uses the item index to add the delimiter only when another tag follows:

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

The final condition compares the current index with the last index in .Params.tags. Change , to any other separator you prefer.