Redirect to framework overview when switching to missing page#336
Merged
raffaelefarinaro merged 3 commits intomainfrom Mar 30, 2026
Merged
Redirect to framework overview when switching to missing page#336raffaelefarinaro merged 3 commits intomainfrom
raffaelefarinaro merged 3 commits intomainfrom
Conversation
Swizzle @theme/NotFound/Content to intercept 404s within /sdks/ paths
and redirect to the framework's fallback page instead of showing an error:
- Linux → /sdks/linux/overview/
- All other frameworks → /sdks/{framework}/core-concepts/
Handles compound frameworks (net/ios, xamarin/android, etc.) and
versioned paths (/7.6.9/, /next/). Guards against redirect loops if
the fallback page itself is not found.
The fix targets NotFound/Content (used by DocRoot when no doc route
matches) rather than NotFound (the top-level catch-all, which is never
reached via client-side navigation).
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Core concepts doesn't exist within framework pages in older versions, so fall back to add-sdk/ instead for /7.6.9/ and /6.28.8/ paths. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Match any 6.28.x or 7.6.x version rather than specific patch versions, since core-concepts doesn't exist within framework pages in those older versioned docs. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
raffaelefarinaro
approved these changes
Mar 30, 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.
Swizzle @theme/NotFound/Content to intercept 404s within /sdks/ paths and redirect to the framework's fallback page instead of showing an error:
Handles compound frameworks (net/ios, xamarin/android, etc.) and versioned paths (/7.6.9/, /next/). Guards against redirect loops if the fallback page itself is not found.
The fix targets NotFound/Content (used by DocRoot when no doc route matches) rather than NotFound (the top-level catch-all, which is never reached via client-side navigation).