Change Permalinks for root section

Hey all,
I would like to use the permalink rewrite from the config not only for every section, but also for things that are not in a section but right in the content dir. Is that possible?

What I have is

[permalinks]
“news” = “/en/news/:year/:month/:title/”

I would like to use

[permalinks]
“news” = “/en/news/:year/:month/:title/”
“” = “/en/”

… but Hugo doesnt copy the content in that case. The alternative will be to move all the rest from content/ into a /main section and put a permalink there. Will do, but I’d have to fix all references.

Thanks guys,
Dennis

Ok I’ve just seen the obviuous. I forgot the :title in the second permalink rewrite. What I now have:

[permalinks]
“news” = “/en/news/:year/:month/:title/”
“” = “/en/:title”

This does what I want :slightly_smiling:

Remaining issue:
The list template renders to “/news/” and ignores the permalink change to “en/news/”. Is that expected?

1 Like