Closed vanbroup closed 9 months ago
Duplicate of https://github.com/gohugoio/hugo/issues/4926.
Workaround (sort of):
posts: /:year/:month/:day/:slug/
slug
token will return the title if no slug is provided in the front matterslug
in the front matter as needed (e.g., slug: something without a hash mark
)Thanks @jmooring, sorry that I missed that, that issue is 6y old 🤔
It doesn't sound as difficult problem to resolve, manually setting the slug is not something that is easy to explain to users and this doesn't seem to be an intended behavior.
I was looking to create a quick fix but couldn't find where the urlize runs, I thought in permalink.go any suggestions where this is handled? Maybe I can create a fix including some new tests.
I wouldn't spend any time on this until https://github.com/gohugoio/hugo/pull/11830 is merged and the dust settles.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
config.yaml
Will generate a link like: "/2024/01/15/a-title-with-a-#-will-generate-invalid-links/", where everything after the # will be treated as a fragment.