docs-support: side-nav highlight for extension-suffixed URLs - #790
Merged
NullVoxPopuli merged 4 commits intoAug 19, 2026
Merged
Conversation
Docs pages are reachable both extension-less (the nav's own hrefs) and with .md / .gjs.md suffixes (every prose cross-link produces these), and collection indexes at both /section and /section/index. The link helper's isActive compares URLs exactly, so following any cross-link silently dropped the nav highlight. Normalize both sides before comparing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
Contributor
|
NullVoxPopuli
approved these changes
Jul 20, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
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.
Docs pages are reachable both extension-less (the side-nav's own hrefs) and with
.md/.gjs.mdsuffixes — every prose cross-link produces the suffixed form — plus collection indexes at both/sectionand/section/index. Thelinkhelper'sisActivecompares URLs exactly, so as soon as a reader follows any cross-link, the nav highlight silently disappears.This normalizes both sides (
.gjs.md/.gjs/.mdsuffixes,/index, trailing slash, query strings) before comparing, inSectionLink/SubSectionLink.Verified against the docs-app dev server: visiting
/3-ui/switch.mddirectly now highlights "Switch" in both the desktop and mobile navs; in-app navigation behavior is unchanged. The normalization also passed a table-driven check during development:Found while building out universal-ember/form's docs (universal-ember/form#23) — this fixes the same behavior for the primitives, table, and form docs sites alike.
🤖 Generated with Claude Code