How do you output a range of .Params as a comma delimited string without whitespace or line breaks?
{{ range where .Site.Pages.ByDate.Reverse "Section" "listings" }}
{{ if (isset .Params "solddate") }}
{{ else }}
{{ if (isset .Params "partnumber") }}
{{ .Params.partnumber }}
{{ end }}
{{ end }}
{{ end }}
Desired output would look similar to this: 13312340,13312341,13312343,13312349,13312350
I used the script below to separate multiple tags with a comma:
{{ if isset .Params "solddate" }}
{{ $paramLen := len .Params.solddate }}
{{ if gt $paramLen 0 }}
{{ range $k, $v := .Params.solddate }}
{{ $v }}
<!-- The comma will be inserted below -->
{{ if lt $k (sub $paramLen 1) }},{{ end }}
{{ end }}
{{ end }}
{{ end }}
This script is a bit bulky but the next release of Hugo will provide a much more elegant syntax: