kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
922 stars 203 forks source link

Option to put default language in subfolder seems to have broken possibility to put default language in subfolder and in root folder #186

Open sceee opened 3 years ago

sceee commented 3 years ago

In the past, I used a setup as described here: https://github.com/kurtsson/jekyll-multiple-languages-plugin/issues/86#issuecomment-504036422 https://github.com/kurtsson/jekyll-multiple-languages-plugin/issues/103#issuecomment-348709528

Previously, I used a config like this

languages: ["en", "en", "de"]

to generate a folder structure as follows:

index.html // English index
en/index.html //English index - equals root index.html
de/index.html //German index

Now, I think since https://github.com/kurtsson/jekyll-multiple-languages-plugin/pull/170 and the added possibility for default_locale_in_subfolder: true, it seems this feature is no longer working. (I guess it's because the check here https://github.com/kurtsson/jekyll-multiple-languages-plugin/pull/170/files#diff-df0ad4e0b34533f0e9e0da71b9bc9903f58a372667f8fe9360d414eb19f8ae83R164 )

I tried it with

languages: ["en", "en", "de"]
default_locale_in_subfolder: true

or

languages: ["en", "en", "de"]

or

languages: ["en", "en", "de"]
default_locale_in_subfolder: false

or

languages: ["en", "de"]
default_locale_in_subfolder: true

but it seems I can no longer put the default language (en) in the root and in a subfolder.

Is there any way to still achieve this folder structure? Maybe @kurtsson you know a solution as it was your PR?

awesomebloging commented 3 years ago

+1 for this reason I have an empty home page

s-gbz commented 2 years ago

I see no jekyll-only/javascript-viable workaround at the time, because the root directory is completly empty. However, we can at least fix the issue by redirecting trafic from / to en via our hoster. In case of Netlify one can consult https://docs.netlify.com/routing/redirects/redirect-options/