Can I redirect a to the language specific page?

I’m currently making a simple blog for which I’m maintaining 2 languages, english and french.
To do so, I’m using bundle pages with a tree like :

└── 2023
    └── 04
        └── test-post

Each article should have an url like :<en>/2020/01/<en-title>/.

But also a slug url like :<lang>/2020/01/slug or (I don’t really know what’s best for a slug url, I’m open to any advice !)

And finally a redirection between translated pages like :<en>/2020/01/<fr-title> would redirect and rewrite the url to the english page.

Is there a way to do this ?

Also here I’m thinking of a practical usage but is it wise to do this from an SEO perspective ?

Best Regards,

I’ve read your post several times, and I don’t understand the objective.

I’m sorry, my explanations may be confused.

The goal of this question is to configure Hugo to get several urls pointing to the same article with some redirections related to the language specified in the url.

For example with a post about football, I’ll have an index.<lang>.md for each language in a bundle page directory.
I’d like to be able to read the English version of the page with :

  • An url made with the english title :
  • An url made with the article slug and the en prefix :
  • An url made with the french title but with the /en/ prefix like : redirecting to the first url.

I may have misunderstood what a slug is referring to, from my understanding it’s a unique human readable identifier to a page or a page bundle ?

Does this help in the comprehension of the wanted result ?

Best Regards,

The first one can be accomplished via directory structure or permalinks in site config.

The second and third require manual aliases in front matter.

If it were me, I’d choose #1 or #2 and forget about the others.

I see, I’m gonna stick with the first one then, thanks for the support !

Can you enlighten me about what a slug is supposed to be ? For which kind of resource ?


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.