You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently building a documentation site and stumbled across this bug while migrating my translations.
The used docs_structure is folder and I'm using mkdocs-material.
Translation fallback files get sorted in a separate navigation entry with the same name:
Here, S3/Mana and magic/Test is supposed to be filed with all other entries in S3/Mana and magic/ above.
@WizzardMaker (CC: @ultrabug )
This issue was quite easy to reproduce using the provided mkdocs.yaml.
Conclusion
mkdocs-static-i18n needs to modify reconfigure_navigation in folder.py.
Detail
For example, consider the following directory structure:
docs
en
S3
test1.md
test2.md
den
S3
test2.md
test3.md
reconfigure_navigation removes the language info from the path, so the nav is modified as follows:
docs
S3
test1.md
test2.md
S3
test2.md
test3.md
After this, there is no process to merge the same S3 directories, so nav_item.html in mkdocs-material renders each as a separate item, resulting in the problem you pointed out.
However, I'm aware of another issue where the sidebar display state is reset when transitioning from a page in a non-default language to a page that only exists in the default language(=fallback page).
I don't think this is related to my PR because I can reproduce this problem without my PR, but I think it needs to be fixed.
I'll do a little investigation but if I can't find the cause, I will issue a PR for the current fix.
I'm currently building a documentation site and stumbled across this bug while migrating my translations.
The used docs_structure is folder and I'm using mkdocs-material.
Translation fallback files get sorted in a separate navigation entry with the same name:
Here,
S3/Mana and magic/Test
is supposed to be filed with all other entries inS3/Mana and magic/
above.This is my mkdocs.yml:
The folder structure is as follows (truncated for only necessary parts)
I don't know if I configured something wrong with this plugin or if mkdocs-material is breaking something
The text was updated successfully, but these errors were encountered: