Open WizzardMaker opened 6 months ago
@WizzardMaker (CC: @ultrabug ) This issue was quite easy to reproduce using the provided mkdocs.yaml.
mkdocs-static-i18n needs to modify reconfigure_navigation in folder.py.
For example, consider the following directory structure:
reconfigure_navigation removes the language info from the path, so the nav is modified as follows:
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.
@WizzardMaker @ultrabug I think the problem pointed out in this issue will be resolved by the following modifications. https://github.com/ultrabug/mkdocs-static-i18n/compare/main...AngryMane:mkdocs-static-i18n:issue_300
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