Closed kwisatz closed 12 months ago
I found this issue as well. The analysis by OP is correct:
So my assumption is that during the first run (1st locale), the
site.translations
hash does not yet have values for any locales other than that very first locale.
This would be fixed by: https://github.com/kurtsson/jekyll-multiple-languages-plugin/pull/207
Thank you @figgles for fixing it!
We observed that
jekyll serve
andjekyll build
seem to behave differently in regards tosite.translations
. Whereas theserve
process seems to build a hash from all available languages, then build the site, thebuild
process seems to start building a first version with only that locale present in thesite.translations
hash.Consider the following snippet:
And the following
yaml
files:In a
serve
context, this drop-down will correctly display links for all locales defined for the project. However, in abuild
context, the dropdown for the first locale version will have empty values for any locale > 1, the second locale will only have values for 1 & 2 and the third locale version will have values for 1, 2 and 3.So my assumption is that during the first run (1st locale), the
site.translations
hash does not yet have values for any locales other than that very first locale.Can someone confirm that assumption and maybe explain why this difference exists?