I want to migrate a blog from Jekyll to Hugo but there is one problem: I need to specify permalinks in post front matter. Using permalinks for individual posts I can keep URLs for blog posts that don’t conform to the nominal way Hugo creates URLs.
I’ve gone through the docs and it seems this feature doesn’t exist. Is there a workaround?
The permalinks can be set using the slug
variable in front matter like this.
To make that work as you intend, you also need to configure the permalinks.post
option.
Here’s an example.
Here’s the official help page on Permalinks.
1 Like
Thanks! That works perfectly
Actually you should be able to override permalinks using slug
or url
in frontmatter. This currently doesn’t work for me, but I only just noticed it. Hugo versions 0.27.1 and 0.29 (at least) exhibit this behavior.