Skip to content

Folders without their own page always sort first #7

Description

@HenningWendtland

build_navigation_tree() synthesises a node for each intermediate path segment and hardcodes "order": 0 (compendium/docs.py:543). Sorting is (order, title, path) (:571), so a folder without its own index.md always outranks every sibling page carrying a non-zero order, no matter where the author wants it.

Authors can work around it by shipping an index.md with an explicit order in every folder — worth stating in the authoring guide either way — but the default behaviour is surprising, and there's no hint that a missing index.md is what moved the entry.

Options: let a synthesised folder node inherit the minimum order of its children, or sort page-less folders after pages at equal order.


🤖 Auto-generated by Claude Code from a read of the code at 82e1353. Filed for triage — not yet reviewed by a human.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions