Skip to content

Conversation

@AngryMane
Copy link
Contributor

This PR fixes Not yet translated files in duplicated navigation entry.

root cause

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.

how to fix

if two sections meet all the following conditions , merge them.

  • has same parent
  • same title

@ultrabug
Copy link
Owner

ultrabug commented Dec 3, 2025

Thanks a lot @AngryMane ; do you think you can make time to provide a test as well so we are sure to prevent any regression later on? If not, I will work on adding one when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not yet translated files in duplicated navigation entry

2 participants