How to combine replace with delimit function?

For each of my projects I have a tags section where I have listed the technologies I used. When I add C# to one of the tags, I get a build error. So I have the tag listed as “C-Sharp” instead and I’m using the replace function to rename this at runtime.

I’m trying to use delimit function to add a comma after each of my tags.

Using these individually work but when I try to combine them, it doesn’t work. Can someone please help? See my code below

<div class="project-title">
            <h2>{{ .Title }}</h2>
            <p>{{range .Params.tags}}
                    {{replace . "-Sharp" "#" | delimit . ", "}}
                {{end}}
            </p>
</div>

No need to iterate (range) over the taxonomy terms:

{{ with .Params.Tags}}
  {{ delimit . ", " | replaceRE "-Sharp" "#" }}
{{ end }}
1 Like

Thanks, this is exactly what I was looking for!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.