After upgrading to v0.123.x, Hugo seems to be using anchorize rather than urlize when creating urls for term pages.
Given the following categories:
Things & Other things
Best & Worst of Times
Articles & News
This & That
Hugo v0.119.0 generates the following relative URLs
/categories/articles-news/
/categories/best-worst-of-times/
/categories/things-other-things/
/categories/this-that/
However v0.123.6 generates the following (note the extra double hyphens in place of &):
/categories/articles--news/
/categories/best--worst-of-times/
/categories/things--other-things/
/categories/this--that/
Reproduction:
git clone --single-branch -b anchorized-category-urls https://github.com/alanbreck/hugo-testing anchorized-category-urls
cd anchorized-category-urls
rm -rf public && hugo
Either 301 redirects server-side, or generate content pages (as needed) with βaliasesβ in front matter. I guess on some sites it could affect every term, but on most sites itβs probably a subset.
@bep Please confirm that this (see my previous comment) was an intentional change. It probably doesnβt affect that many URLs in the wild, but redirects are required.
Related to the issue of understanding what the precise behavior will be, does it use anchorize or urlize under the hood? At first glance, it appears that it does not since hyphens are added for whitespace, but . is preserved.
Please create an issue in the docs repository. I think this should be about Page.RelPermalink and Page.Permalinkβ¦ what weβre talking about in this issue is not specific to taxonomy or term pages. The revised documentation should describe the relationship between the contentβs file path (or logical path when the content is not backed by a file) and the published URL.
Also note https://github.com/gohugoio/hugoDocs/issues/2307. The concepts referenced/described in the effected pages need to consolidated. Itβs a bit of a mess right now, so Iβd like to limit the proposed docs change to the Permalink/RelPermalink pages. #2307 is a few days of work, so itβs not going to happen tomorrow.