mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 14:59:45 +00:00
Avoid space before comma in tag list (#94)
This commit is contained in:
parent
2267f54d5a
commit
a690dc3bc5
1 changed files with 3 additions and 2 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue