Avoid space before comma in tag list (#94)

This commit is contained in:
Kevin Ottens 2018-10-10 15:59:03 +02:00 committed by Hanzei
parent 2267f54d5a
commit a690dc3bc5

View file

@ -43,10 +43,11 @@
</div>
{{ end }}
{{ if .Params.tags }}
{{ $len := (len .Params.tags) }}
<p>
Tag{{ if gt (len .Params.tags) 1 }}s{{ end }}:
Tag{{ if gt $len 1 }}s{{ end }}:
{{ range $index, $tag := .Params.tags }}
{{ if gt $index 0 }}, {{ end }}<a href="{{ "/tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a>
<a href="{{ "/tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a>{{ if ne (add $index 1) $len }},{{ end }}
{{ end }}
</p>
{{ end }}