Skip to content

Set /docs/pro as canonical Pro docs landing page#20

Merged
justin808 merged 1 commit intomainfrom
jg/pro-docs-canonical-slug
Mar 17, 2026
Merged

Set /docs/pro as canonical Pro docs landing page#20
justin808 merged 1 commit intomainfrom
jg/pro-docs-canonical-slug

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Mar 17, 2026

Summary

Establishes /docs/pro as the canonical landing page for React on Rails Pro documentation instead of /docs/pro/react-on-rails-pro.

Changes:

  • Inject slug: /pro into react-on-rails-pro.md frontmatter to serve at /docs/pro directly
  • Update all navigation links (navbar, footer, pro.tsx) to point to /docs/pro
  • Remove unnecessary 302 redirect
  • Clean separation: /pro for Pro Plans, /docs/pro for Pro Docs

This 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/pro as the canonical React on Rails Pro docs entrypoint by updating site navigation and CTA links (navbar, footer, /pro page) to target /docs/pro instead of /docs/pro/react-on-rails-pro.

Updates the docs build pipeline (scripts/prepare-docs.mjs) to inject slug: /pro into pro/react-on-rails-pro.md frontmatter (and only inject the friendly notice if missing), and removes the now-unneeded /docs/pro/docs/pro/react-on-rails-pro redirect from _redirects. Documentation for Cloudflare redirect strategy is adjusted accordingly.

Written by Cursor Bugbot for commit 5061aa5. Configure here.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Simplified and unified Pro documentation navigation paths across the platform for improved discoverability and better user experience.

- 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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

Walkthrough

This pull request simplifies the Pro documentation URL structure by removing the redirect indirection from /docs/pro to /docs/pro/react-on-rails-pro. All navigation links, server redirects, and build scripts are updated to target the consolidated path directly.

Changes

Cohort / File(s) Summary
Redirect Rules
CLOUDFLARE_SETUP.md, prototypes/docusaurus/static/_redirects
Removed the 302 redirect rule that mapped /docs/pro to /docs/pro/react-on-rails-pro, consolidating the Pro documentation path.
Navigation & Routing
prototypes/docusaurus/docusaurus.config.ts, prototypes/docusaurus/src/pages/pro.tsx
Updated navbar "Pro Docs" link, footer "React on Rails Pro" link, and "Try Pro Free" button to route to /docs/pro instead of the longer nested path.
Build Process
scripts/prepare-docs.mjs
Refactored injectProFriendlyNotice to ensure slug frontmatter exists and conditionally inject the policy notice; updated docsHomeMarkdown link to use absolute path /docs/pro.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Paths consolidated, redirects gone—
Pro docs now direct, no detours drawn!
From nested to simple, the journey is bright,
URLs aligned, oh what a delight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Set /docs/pro as canonical Pro docs landing page' directly and clearly describes the main change: establishing /docs/pro as the primary landing page for Pro documentation, which aligns with the changeset's primary objective.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/pro-docs-canonical-slug
📝 Coding Plan
  • Generate coding plan for human review comments

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

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 24a85c6 and 5061aa5.

📒 Files selected for processing (5)
  • CLOUDFLARE_SETUP.md
  • prototypes/docusaurus/docusaurus.config.ts
  • prototypes/docusaurus/src/pages/pro.tsx
  • prototypes/docusaurus/static/_redirects
  • scripts/prepare-docs.mjs
💤 Files with no reviewable changes (2)
  • CLOUDFLARE_SETUP.md
  • prototypes/docusaurus/static/_redirects

@github-actions
Copy link
Copy Markdown

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread scripts/prepare-docs.mjs
if (!updated.includes("slug:")) {
if (updated.startsWith("---")) {
// Existing frontmatter — insert slug after opening ---
updated = updated.replace(/^---\n/, "---\nslug: /pro\n");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@justin808 justin808 merged commit 1a5c9d2 into main Mar 17, 2026
4 checks passed
justin808 added a commit to shakacode/react_on_rails that referenced this pull request Mar 17, 2026
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]>
justin808 added a commit to shakacode/react_on_rails that referenced this pull request Mar 17, 2026
## 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]>
justin808 added a commit to shakacode/react_on_rails that referenced this pull request Mar 30, 2026
- 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]>
justin808 added a commit to shakacode/react_on_rails that referenced this pull request Apr 6, 2026
- 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]>
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.

1 participant