Skip to content

Add redirect coverage for canonical Pro docs slugs#71

Merged
justin808 merged 1 commit intomainfrom
jg/fix-70
Apr 2, 2026
Merged

Add redirect coverage for canonical Pro docs slugs#71
justin808 merged 1 commit intomainfrom
jg/fix-70

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Apr 2, 2026

Summary

Add explicit redirects from legacy Pro landing routes to /docs/pro/ so slug canonicalization does not break existing inbound links.
This covers /docs/pro/react-on-rails-pro*, /docs/pro/home-pro*, and /pro/* variants, including trailing slash and .md forms.
Closes #70.

Test Plan

  • npm run build:full

Note

Low Risk
Low risk: static redirect-table updates only, with the main risk being incorrect mappings causing unexpected navigation or SEO effects.

Overview
Adds explicit 301 redirects in prototypes/docusaurus/static/_redirects to preserve inbound links to legacy React on Rails Pro landing slugs.

The new rules canonicalize /docs/pro/* and /pro/* variants (including trailing-slash and .md forms for react-on-rails-pro and home-pro) to the canonical /docs/pro/ route.

Written by Cursor Bugbot for commit af773a8. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores
    • Implemented redirect rules for legacy Pro documentation URLs to consolidate multiple variants and access patterns. Users accessing documentation through older links are now automatically redirected to the current Pro documentation path, ensuring seamless navigation, preventing broken links, and maintaining full backward compatibility with previously bookmarked or shared URLs.

Add explicit redirect rules for prior Pro landing routes so canonical /docs/pro slug cleanup does not break existing inbound links.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Walkthrough

Added 10 new 301 redirect rules to the Docusaurus redirects configuration file, mapping multiple legacy Pro URL path variants (including different extensions and slash patterns) to the consolidated /docs/pro/ destination path.

Changes

Cohort / File(s) Summary
Redirect Rules
prototypes/docusaurus/static/_redirects
Added 10 new 301 redirects for legacy Pro documentation URL patterns (/docs/pro/, /pro/ with and without trailing slashes and .md extensions) to route uniformly to /docs/pro/.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hops through the redirects with care,
Old paths now lead to new air,
No broken links shall roam,
Pro docs find their home!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add redirect coverage for canonical Pro docs slugs' clearly and concisely describes the main change in the pull request, which adds new 301 redirect rules for Pro documentation URLs.
Linked Issues check ✅ Passed The PR adds explicit redirects for legacy Pro doc routes to the canonical /docs/pro destination, directly addressing issue #70's requirement to add redirect coverage for doc slug changes to prevent broken inbound links.
Out of Scope Changes check ✅ Passed The PR contains only redirect rule additions to the _redirects file for Pro documentation URLs, remaining narrowly focused on the redirect behavior objective specified in issue #70 without introducing unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/fix-70

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Missing .md redirects for /pro/ prefix paths
    • Added the missing /pro/react-on-rails-pro.md and /pro/home-pro.md redirects to preserve .md legacy links under the /pro/ prefix.

Create PR

Or push these changes by commenting:

@cursor push 1c67af2e47
Preview (1c67af2e47)
diff --git a/prototypes/docusaurus/static/_redirects b/prototypes/docusaurus/static/_redirects
--- a/prototypes/docusaurus/static/_redirects
+++ b/prototypes/docusaurus/static/_redirects
@@ -15,8 +15,10 @@
 /docs/pro/home-pro.md /docs/pro/ 301
 /pro/react-on-rails-pro /docs/pro/ 301
 /pro/react-on-rails-pro/ /docs/pro/ 301
+/pro/react-on-rails-pro.md /docs/pro/ 301
 /pro/home-pro /docs/pro/ 301
 /pro/home-pro/ /docs/pro/ 301
+/pro/home-pro.md /docs/pro/ 301
 /react-on-rails/docs/* /docs/:splat 301
 /react-on-rails/docs /docs 301
 /react-on-rails-pro/docs/* /docs/:splat 301

You can send follow-ups to this agent here.

/pro/react-on-rails-pro /docs/pro/ 301
/pro/react-on-rails-pro/ /docs/pro/ 301
/pro/home-pro /docs/pro/ 301
/pro/home-pro/ /docs/pro/ 301
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing .md redirects for /pro/ prefix paths

Low Severity

The /docs/pro/ prefix variants (lines 10–15) each cover bare slug, trailing-slash, and .md forms, but the /pro/ prefix variants (lines 16–19) are missing the .md counterparts (/pro/react-on-rails-pro.md and /pro/home-pro.md). Inbound links using those .md paths would 404 instead of redirecting to /docs/pro/.

Fix in Cursor Fix in Web

@justin808 justin808 merged commit e82c733 into main Apr 2, 2026
3 of 4 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Cloudflare preview deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs follow-up: add redirect coverage for canonical docs slugs

1 participant