Hi,
I’m trying to render a category with an ampersand in their name using a modified version of the “mainroad” template. This is the relevant snippet (from themes/mainroad/layouts/partials/widgets/categories.html, not working):
<ul class="widget__list">
{{- range $name, $items := .Site.Taxonomies.categories }}
<li class="widget__item"><a class="widget__link" href="{{ "categories/" | relLangURL }}{{ $name | urlize | lower }}">{{ replace $name "-" " " | title }} ({{ $items.Count }})</a></li>
{{- end }}
</ul>
Apparently .Site.Taxonomies.categories already contains a transformed category name so I lose whitespaces, special case (eg: “CERN” becomes “Cern”), etc. Is there a way of rendering the list of categories verbatim?
Thanks