Reputation: 1337
I have a content section called foo
, with several pages whose path is content/foo/pageNNN.md
. They are rendered at /foo/pageNNN/index.html
.
What if I wanted my foo
s to become bar
s? Do I have to rename the folder, or is there a way to just change the destination URL to /bar/pageNNN/index.html
?
Upvotes: 1
Views: 1267
Reputation: 12592
Write this in your config file:
permalinks:
foo: /bar/:filename
Source: https://gohugo.io/content-management/urls/#permalinks-configuration-example
Upvotes: 1