I have post tags like C#
and F#
. Similar cases also show up in titles.
The problem is that Hugo does not appear to support # in a url. Such pages 404 and fail my Netlify build. With content pages, I can set an explicit url to get around the special character.
The same can't be done for the auto-generated taxonomy pages. How can I get hugo to escape or strip special characters (like #) from urls?
Note: removePathAccents doesn't apply for non-accent special chars like # or %
You can set-up specific URL for almost anything in Hugo. To set-up a different URL for those tags:
./content/tags/C#/_index.md
url: "/tags/c-sharp"