I am trying to add commas using the delimit function when pulling taxonomies from a range:
I’d like to use: {{ delimit .Params.tag ", " " and " }}
, but am not sure how to add additional function to process the parameter tag. I was hoping not to have to write a bunch of if statements to determine if more commas are needed, I assumed the delimit function had that built in. The following is the code I’d like to use commas and possibly the “and” as well when outputting the tags:
{{ if isset .Params "tag" }}
<div class="tags">tags:</br>
{{ range .Params.tag }}<a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }} </a>{{ end }}
</div>
<div class="content-tags">{{.Summary}}</div>
{{ end }}