Permalink
Browse files

Avoid space before comma in tag list (#94)

  • Loading branch information...
er-vin authored and hanzei committed Oct 10, 2018
1 parent 2267f54 commit a690dc3bc5226608d6561cbd68e8dad6986aa62d
Showing with 3 additions and 2 deletions.
  1. +3 −2 layouts/blog/single.html
View
@@ -43,10 +43,11 @@ <h2 class="title is-1 top-pad strong-post-title">
</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 }}

0 comments on commit a690dc3

Please sign in to comment.