Actually I have this code to render tags
{{ if .Params.tags }}
{{ range .Params.tags }}
<a class="bg-gray-100 rounded-full px-3 py-1 text-gray-darkest" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
I’d like to create a custom html tag in order to centralize the rendering
{{ if .Params.tags }}
{{ range .Params.tags }}
<badge href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</badge>
{{ end }}
{{ end }}
and the definition the badge render would be something like
<a class="bg-gray-100 rounded-full px-3 py-1 text-gray-darkest" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
Is there a way to do this with hugo ?