fix: update /docs/v1/ redirect to latest v1.2#492
Conversation
The Netlify redirect for /docs/v1/* was pointing to the outdated v1.0. Also adds a Hugo alias on the v1.2 index for GitHub Pages compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 42 minutes and 44 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis change relocates the default short-form Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation versioning by adding an alias for /docs/v1/ in the v1.2 index file and updating the Netlify redirect rule to point /docs/v1/* to the v1.2 documentation. Feedback was provided to improve the redirect logic in netlify.toml by adding force = true to prevent conflicts with Hugo-generated files and adding an explicit redirect for the base path /docs/v1 to ensure consistent behavior.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@layouts/404.html`:
- Line 10: The fallback redirect currently uses window.location.pathname only
(window.location.replace(window.location.pathname.replace(shortPrefix,
fullPrefix))) which drops the query string and hash; update the logic in this
redirect to reconstruct the full current location by taking
window.location.pathname, appending window.location.search and
window.location.hash, perform the same replace on the pathname portion (using
shortPrefix and fullPrefix) and then call window.location.replace with the
rebuilt URL so query parameters and fragment are preserved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1883ee5d-2b42-4551-ab54-bc3e22358bca
📒 Files selected for processing (5)
CLAUDE.mdcontent/en/docs/v1.0/_index.mdcontent/en/docs/v1.2/_index.mdlayouts/404.htmlnetlify.toml
💤 Files with no reviewable changes (1)
- content/en/docs/v1.0/_index.md
Production is served by GitHub Pages, not Netlify, so netlify.toml redirects don't work. Add JS redirect in 404.html that maps /docs/v1/<path> → /docs/v1.2/<path> using the latest_version_id param. Also remove the stale /docs/v1/ alias from v1.0 _index.md (moved to v1.2 in the prior commit) and document the GitHub Pages constraint in CLAUDE.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
eae121f to
0926d5c
Compare
Summary
/docs/v1/*→/docs/v1.2/:splat(was pointing to outdated v1.0)/docs/v1/on the v1.2 docs index for GitHub Pages compatibilityTest plan
/docs/v1/redirects to/docs/v1.2//docs/v1/some-page/redirects to/docs/v1.2/some-page/🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
/docs/v1/now directs to v1.2 documentation instead of v1.0Chores