Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Consider relative url vs lang prefix #5818
I saw a multilingual site in the wild with this front matter:
Since we in Hugo 0.55 supports page-relative URLs in front matter (a good thing!), the above would end up below
Both of the below would produce correct output:
I suspect that it is more common than not to have a leading
Hey Bep !! Thanks for the cc:
If I juste use folder and file name automatically created by hugo out of the box it works fine.
But it doesn't goes well with SEO because file names/url/contents are quite differents.
So in order to keep SEO happy I had to change url name to be consistent with each language (ex : hiking/randonnees).
And I couldn't find an other workaround than putting the language prefix in urls (en/hiking, fr/randonnees).
But avoiding to have hardcoding language in URL would be perfect.
Sure, I have no problem with the "why" -- my motivation behind this issue is to reduce the number of questions/issues about this particular issue once we release 0.55. I so I might add another check.
referenced this issue
Apr 7, 2019
Sorry: I am not sure whether this is related.
The reason why I need to use e.g.
results in this URL:
If helpful, I can upload a minimal working setup.
Just to specify: This problem only occurs when a folder is used—as described here