Codex URL structure and category navigation#2624
Merged
Conversation
…null' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Mpdreamz
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new URL structure and navigation model for the documentation codex:
/r/{repo-name}) that do not change when category membership changes/g/{category}) that group related documentation setscodex.elastic.dev)Motivation
Previously, repository URLs could be tied to category structure, so changing a repo’s category could break links. We also lacked a way to show a single navigation tree for a set of related docs.
This change separates URL shape from organisation:
/r/apm-agentalways targets the APM Agent docsImplementation
URL patterns
/r/{repo-name}/r/apm-agent,/r/uptime-docs/g/{category}/g/observability,/g/tooling/or/{site_prefix}/,/internal-docsArchitecture
GroupNavigation– New navigation root type per category. It is theNavigationRootfor all repos in that category, holds the category landing page and member repos as top-level items, and ensures the same sidebar on the category landing and every member repo page.DocumentationSetNavigationis their ownNavigationRoot, so the sidebar shows only that repo’s tree.IsolatedBuildNavigationHtmlWriter– UsesSelectNavigationRoot()so when a different root is requested (e.g.GroupNavigation), that root is used for rendering instead of the site root.TopLevelItemscome from the selected navigation, so the sidebar reflects the correct tree.Key changes
New
GroupNavigation.cs– Category navigation root and related types (GroupIndexLeaf,GroupLinkLeaf, etc.)GroupLandingView.cshtml– Razor view for category landing pagesGroupLandingViewModel.cs– View model for category landing pagesNavigation behaviour
GroupNavigationDocumentationSetNavigationConfiguration
Manual verification
dotnet run --project src/tooling/docs-builder -- codex clone config/codex.example.ymldotnet run --project src/tooling/docs-builder -- codex build config/codex.example.ymldotnet run --project src/tooling/docs-builder -- codex serve/r/{repo}works for all repos regardless of category/g/{category}shows only that category’s membersdisplay_namefrom config appears in the sidebarsite_prefixand with a prefixRecording
cursorful-video-1770203225778.mp4