Multilingual URL - slug is being ignored

I’m setting up a multilingual site and I would like to rewrite the slug of a given page. I have two files in my content folder: /content/about/_index.en.md and /content/about/_index.fr.md. Inside the _index.fr.md file I have this as front matter:

title: À propos
slug: a-propos

And in my config file I have this set:

permalinks:
  blog: /:section/:slug/
  about: /:slug/

For some odd reason, the blog permalinks get rewritten fine, but the About page is ignored and still generates at http://example.com/fr/about.

I don’t know how to solve this problem. :thinking:

Permalinks configuration have no effect on section pages. With the up-coming Hugo 0.33 you can set the url to whatever you like, but there is no concept of slug/permalinks etc.

1 Like

Thanks for you reply bep. Does that mean that section pages can’t have a dedicated URL as well?

I’ve tried removing the permalink configuration since you said it has no effect, but I thought Hugo would still take into account the slug parameter in the _index.fr.md file.

You might have guessed, my initial goal was to have these two URLs:

http://example.com/about
http://example.com/fr/a-propos

I’m trying to understand if my problem resides in my content organization, my config file, or if I’m just trying to do something that can’t be done at this time. :smile:

Will the upcoming url feature with Hugo 0.33 work with i18n content? I have a feeling it might be the solution I’m looking for.

Not sure what you mean by dedicated, but as I said: They can in Hugo 0.33 (next version), but you will have to set the url in front matter. That will work with multiple languages.

Alright I think I got it. Thanks a lot for your reply. :slight_smile: