Fix search navigation to legacy documentation URLs - #132
Conversation
|
Focused browser qualification passed at candidate At 1280x800 and 390x844:
The first external-navigation setting and an incorrectly string-encoded replacement were rejected during browser/normalization checks before merge. The final change uses the built-in RegExp replacement, with seven build-time regression assertions. No library or custom navigation layer was added. The |
|
Deployed and verified live on September 12 at 13:59 UTC.
The stale index headings and missing direct reference result remain open in #131. This is a delivered navigation fix, not a claim that the index has been refreshed. |
Problem
Refs #131. Live Waterline search results still point to
/docs/2.0/paths. Those paths have redirect HTML but no React route, so client-side search navigation renders Page Not Found.Change
Use Docusaurus's built-in
replaceSearchResultPathnameto remove only the former/docs/2.0/prefix. Preserve current paths, 1.x routes, queries and anchors. No new dependencies or custom search UI.A focused test exercises the theme's actual configuration normalization, not just the raw JavaScript regexp; Docusaurus escapes string matchers, so the matcher must be a RegExp. The test is part of the existing build command.
Validation
This repairs the legacy-prefix navigation failure, not index freshness. The index still includes old headings/prerelease titles and lacks a direct current Waterline API result. #131 remains open for that separate outcome.