Set /docs/pro as canonical Pro docs landing page#20
Conversation
- Inject slug: /pro into react-on-rails-pro.md frontmatter so it serves at /docs/pro directly (instead of /docs/pro/react-on-rails-pro) - Update navbar, footer, and pro.tsx button links to use /docs/pro - Update docs home link to use /docs/pro - Remove unnecessary redirect from _redirects - Update CLOUDFLARE_SETUP.md redirect documentation This establishes a clean separation: /pro for Pro Plans landing page, /docs/pro for Pro Docs landing page.
WalkthroughThis pull request simplifies the Pro documentation URL structure by removing the redirect indirection from Changes
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/prepare-docs.mjs (1)
442-442: Consider a more precise slug detection check.The current check
!updated.includes("slug:")could theoretically match occurrences in code blocks or prose. A frontmatter-specific regex would be more robust:const hasFrontmatterSlug = /^---[\s\S]*?^slug:/m.test(updated);This is low-risk for the current controlled use case, so flagging as optional.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/prepare-docs.mjs` at line 442, The current slug detection using if (!updated.includes("slug:")) is too broad and may match non-frontmatter occurrences; replace this check with a frontmatter-aware test on the updated string (use a multiline frontmatter regex anchored to the initial --- and look for slug: inside it) so that the code only treats files missing a frontmatter slug as needing one; update the conditional that references updated to use this new hasFrontmatterSlug test (and keep the existing insertion logic unchanged).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/prepare-docs.mjs`:
- Line 442: The current slug detection using if (!updated.includes("slug:")) is
too broad and may match non-frontmatter occurrences; replace this check with a
frontmatter-aware test on the updated string (use a multiline frontmatter regex
anchored to the initial --- and look for slug: inside it) so that the code only
treats files missing a frontmatter slug as needing one; update the conditional
that references updated to use this new hasFrontmatterSlug test (and keep the
existing insertion logic unchanged).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 41fe160e-a819-4eed-821f-05e4e8e31b03
📒 Files selected for processing (5)
CLOUDFLARE_SETUP.mdprototypes/docusaurus/docusaurus.config.tsprototypes/docusaurus/src/pages/pro.tsxprototypes/docusaurus/static/_redirectsscripts/prepare-docs.mjs
💤 Files with no reviewable changes (2)
- CLOUDFLARE_SETUP.md
- prototypes/docusaurus/static/_redirects
|
Cloudflare preview deployed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5061aa5e9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!updated.includes("slug:")) { | ||
| if (updated.startsWith("---")) { | ||
| // Existing frontmatter — insert slug after opening --- | ||
| updated = updated.replace(/^---\n/, "---\nslug: /pro\n"); |
There was a problem hiding this comment.
Preserve legacy Pro docs URL with a redirect
Changing react-on-rails-pro.md to slug: /pro moves the page from /docs/pro/react-on-rails-pro to /docs/pro, but this commit also removes the only /docs/pro redirect and does not add a reverse redirect from the old permalink, so existing inbound links/bookmarks to /docs/pro/react-on-rails-pro will start returning 404 after deploy. Please add an explicit old→new redirect to keep existing URLs working while making /docs/pro canonical.
Useful? React with 👍 / 👎.
Aligns with shakacode/reactonrails.com#20 which sets /docs/pro as the canonical Pro docs landing page instead of /docs/pro/react-on-rails-pro/. Co-Authored-By: Claude Opus 4.6 <[email protected]>
## Summary - Updates the Pro docs link in `react_on_rails_pro/CONTRIBUTING.md` from `/docs/pro/react-on-rails-pro/` to `/docs/pro` - Aligns with shakacode/reactonrails.com#20 which establishes `/docs/pro` as the canonical Pro docs landing page Clean URL separation: `/pro` for Pro Plans, `/docs/pro` for Pro Docs. ## Test plan - [ ] Verify `reactonrails.com/docs/pro` resolves correctly after reactonrails.com#20 is merged 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to documentation URLs and user-facing help/error messages, with no behavioral or API changes. > > **Overview** > Updates documentation links across the repo to use the new canonical `reactonrails.com` domain/paths, including standardizing Pro references to `https://reactonrails.com/docs/pro` and updating `pro.reactrails.com` → `pro.reactonrails.com`. > > Also refreshes various user-facing output (generators, `bin/dev` help, `doctor`, rake task errors) and related test expectations to point at the new docs URLs, plus minor formatting cleanup in `AGENTS.md` and historical links in `CHANGELOG.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d4eb733. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated Pro trial and documentation URLs across README, changelog, guides, and help messages to the reactonrails.com domain. * Standardized presentation of Pro feature notices (converted several lines to blockquote/consistent formatting) for clearer, consistent docs. * Adjusted user-facing messages and test strings to reflect the corrected documentation links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Ihab Adham <[email protected]>
- Updates the Pro docs link in `react_on_rails_pro/CONTRIBUTING.md` from `/docs/pro/react-on-rails-pro/` to `/docs/pro` - Aligns with shakacode/reactonrails.com#20 which establishes `/docs/pro` as the canonical Pro docs landing page Clean URL separation: `/pro` for Pro Plans, `/docs/pro` for Pro Docs. - [ ] Verify `reactonrails.com/docs/pro` resolves correctly after reactonrails.com#20 is merged 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to documentation URLs and user-facing help/error messages, with no behavioral or API changes. > > **Overview** > Updates documentation links across the repo to use the new canonical `reactonrails.com` domain/paths, including standardizing Pro references to `https://reactonrails.com/docs/pro` and updating `pro.reactrails.com` → `pro.reactonrails.com`. > > Also refreshes various user-facing output (generators, `bin/dev` help, `doctor`, rake task errors) and related test expectations to point at the new docs URLs, plus minor formatting cleanup in `AGENTS.md` and historical links in `CHANGELOG.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d4eb733. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Documentation** * Updated Pro trial and documentation URLs across README, changelog, guides, and help messages to the reactonrails.com domain. * Standardized presentation of Pro feature notices (converted several lines to blockquote/consistent formatting) for clearer, consistent docs. * Adjusted user-facing messages and test strings to reflect the corrected documentation links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Ihab Adham <[email protected]>
- Updates the Pro docs link in `react_on_rails_pro/CONTRIBUTING.md` from `/docs/pro/react-on-rails-pro/` to `/docs/pro` - Aligns with shakacode/reactonrails.com#20 which establishes `/docs/pro` as the canonical Pro docs landing page Clean URL separation: `/pro` for Pro Plans, `/docs/pro` for Pro Docs. - [ ] Verify `reactonrails.com/docs/pro` resolves correctly after reactonrails.com#20 is merged 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to documentation URLs and user-facing help/error messages, with no behavioral or API changes. > > **Overview** > Updates documentation links across the repo to use the new canonical `reactonrails.com` domain/paths, including standardizing Pro references to `https://reactonrails.com/docs/pro` and updating `pro.reactrails.com` → `pro.reactonrails.com`. > > Also refreshes various user-facing output (generators, `bin/dev` help, `doctor`, rake task errors) and related test expectations to point at the new docs URLs, plus minor formatting cleanup in `AGENTS.md` and historical links in `CHANGELOG.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d4eb733. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Documentation** * Updated Pro trial and documentation URLs across README, changelog, guides, and help messages to the reactonrails.com domain. * Standardized presentation of Pro feature notices (converted several lines to blockquote/consistent formatting) for clearer, consistent docs. * Adjusted user-facing messages and test strings to reflect the corrected documentation links. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]> Co-authored-by: Ihab Adham <[email protected]>
Summary
Establishes
/docs/proas the canonical landing page for React on Rails Pro documentation instead of/docs/pro/react-on-rails-pro.Changes:
slug: /prointoreact-on-rails-pro.mdfrontmatter to serve at/docs/prodirectly/docs/pro/profor Pro Plans,/docs/profor Pro DocsThis fixes the 404 issue where shakacode.com redirects to
/docs/pro.Note
Medium Risk
Changes the canonical URL and routing for Pro documentation, which could break inbound links or redirects if misconfigured, but is limited to documentation/navigation and build-time rewriting.
Overview
Sets
/docs/proas the canonical React on Rails Pro docs entrypoint by updating site navigation and CTA links (navbar, footer,/propage) to target/docs/proinstead of/docs/pro/react-on-rails-pro.Updates the docs build pipeline (
scripts/prepare-docs.mjs) to injectslug: /prointopro/react-on-rails-pro.mdfrontmatter (and only inject the friendly notice if missing), and removes the now-unneeded/docs/pro→/docs/pro/react-on-rails-proredirect from_redirects. Documentation for Cloudflare redirect strategy is adjusted accordingly.Written by Cursor Bugbot for commit 5061aa5. Configure here.
Summary by CodeRabbit
Release Notes