gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.92k stars 7.54k forks source link

Bundle file override language order seems arbitrary #6082

Closed bep closed 5 years ago

bep commented 5 years ago

I have much simplified the "bundle implemention" and while diffing some sites output, I find some peculiar behavior when having many langauges and you try to reuse non-content files from others. Given this content structure:

nn/b1/index.md
en/b1/index.md
sv/b1/index.md
nb/b1/index.md
en/b1/data.json
sv/b1/data.json

For the nb/b1 bundle (no data.json) you will now sometimes get en/b1/data.json and sometimes sv/b1/data.json.

This is obviously wrong (we should pick one and the same every time), but I have forgotten what it was "supposed to be"? @regisphilibert ?

bep commented 5 years ago

To answer myself in the above:

Pick the first available in a sorted language list, starting from the default content language.

regisphilibert commented 5 years ago

Yes we use the Weight to sort languages. And this order should solve the language "precedence" when dealing with page resources.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.