DevLab Theme can group documentation pages in the sidebar and mobile menu without changing the content directory structure. Groups are collapsible, and the group containing the active page opens automatically.

Define groups in the docs section frontmatter:

[extra]
nav_groups = [
  { title = "Start", pages = ["docs/getting-started.md", "docs/configuration.md", "docs/navigation.md"] },
  { title = "Components", pages = ["docs/shortcodes.md"] },
]

Each pages entry uses the page path from the content/ directory. Link labels come from page titles, and the order follows the pages array.

If no docs page inside a group is active, the first group opens by default. Without JavaScript, all groups stay open so the navigation remains fully usable.

Documentation pages also show previous and next links after the page content. These links follow the same order as nav_groups, so sidebar navigation and page-to-page navigation stay aligned.

Page breadcrumbs use the docs overview, the current group title and the current page title. If groups are not configured, breadcrumbs fall back to docs overview and page title.

The docs overview page also uses nav_groups, rendering the same groups as page cards. If groups are not configured, the overview falls back to a flat page list.