mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Both files and directories should be sorted to ensure consistent ordering of pages in the menus across builds and systems. Turns out to be a simple fix. As `os.walk` provides a reference to the list of dirs it uses internally, we can modify that list in place and it will use the modified list. While this may not give proper alphanumeric ordering for all languages, it goes ensure consistent ordering. For more control over ordering, it is expected that a plugin could be used once that API becomes available. Fixes #638.