Repository navigation
fix: docs nav 404 on browser back/forward - #30
Closed
spacecadetDan wants to merge 2 commits into
Closed
spacecadetDan wants to merge 2 commits into
spacecadetDan wants to merge 2 commits into
Conversation
When a tab has a `path` field (e.g. "/tutorials"), devdoc uses that as both the URL prefix and directory prefix when resolving pages. Pages must be listed relative to the tab path, not from the docs root. Before: tab path="/tutorials" + page "tutorials/index" → URL: /tutorials/tutorials/index → 404 on browser back/forward After: tab path="/tutorials" + page "index" → URL: /tutorials/index → correct Same fix applied to the API Reference tab pages.
spacecadetDan
force-pushed
the
fix/docs-tab-path-404
branch
from
March 11, 2026 03:54
af73f06 to
8145f65
Compare
….json Card components in MDX files used Mintlify-style relative hrefs (e.g. href="/tutorials/rql-basics"). With devdoc's resolveLink(), these get resolved using the current activeTab context, causing two bugs: 1. Tab-only links (href="/tutorials") navigate to /tutorials URL with no page context, showing a blank "Select an endpoint" state after the initial auto-navigation guard fires only once. 2. Cross-tab links (e.g. href="/tutorials/legal-search" from a Documentation page) resolve to /documentation/page/tutorials/legal-search — wrong tab, wrong sidebar. Fix: use devdoc's absolute URL format (href="/tutorials/page/tutorials/X") which bypasses the activeTab resolution entirely (resolveLink returns these unchanged when the path contains /page/). Also restore docs.json to correct state: pages must include the full path relative to docs root (e.g. "tutorials/index") so devdoc check can find the .mdx files. Reverts a bad prior attempt that stripped the prefix. Files changed: - docs/index.mdx: /tutorials → /tutorials/page/tutorials/index - docs/quickstart.mdx: /tutorials → /tutorials/page/tutorials/index - docs/guides/search.mdx: /tutorials/legal-search → absolute URL - docs/tutorials/index.mdx: all 8 Card hrefs → absolute URLs - docs/tutorials/rql-basics.mdx: /tutorials/legal-search → absolute URL - docs/tutorials/legal-search.mdx: /tutorials/knowledge-base → absolute URL - docs/tutorials/research-papers.mdx: /tutorials/rql-basics → absolute URL - docs/tutorials/knowledge-base.mdx: /tutorials/research-papers → absolute URL - docs/docs.json: restore tutorials/ prefix on page paths
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
Changes
Files changed