fix: update docs addon link on homepage to resolve 404 - #426
Conversation
✅ Deploy Preview for storybook-frontpage ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for storybook-addon-catalog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe “Generate UI docs automatically” feature link now points to ChangesDocumentation Link Update
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #422 — the "Learn about docs addon" button on the Storybook homepage links to
/docs/writing-docs/introductionwhich returns a 404. Updated to link to/docs/writing-docswhich is the canonical URL (a 301 redirect from the old path is already configured).Root Cause
The
document.tsxcomponent on the homepage contains a hardcoded link to/docs/writing-docs/introduction. While a 301 redirect exists inraw-redirectsto forward this path to/docs/writing-docs, the redirect doesn't prevent users from seeing a 404 when the redirect chain breaks.Solution
Updated the
hrefin the "Learn about docs addon" feature link from/docs/writing-docs/introductionto/docs/writing-docs— the canonical path already defined as the redirect target.Changes
apps/frontpage/components/home/document/document.tsx: Changed href from/docs/writing-docs/introductionto/docs/writing-docs(+1 -1)Testing
/docs/writing-docspath/docs/writing-docs/introductionin the codebaseSummary by CodeRabbit