Skip to content

docs: correct routing example code - #3937

Merged
pi0 merged 3 commits into
nitrojs:mainfrom
kricsleo:docs/routing-section
Mar 17, 2026
Merged

pi0 merged 3 commits into
nitrojs:mainfrom
kricsleo:docs/routing-section

Conversation

@kricsleo

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #3936

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@kricsleo
kricsleo requested a review from pi0 as a code owner January 10, 2026 12:21
@vercel

vercel Bot commented Jan 10, 2026

Copy link
Copy Markdown

@kricsleo is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jan 10, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b50db4b5-0eff-43d0-9c35-4ff827184c80

📥 Commits

Reviewing files that changed from the base of the PR and between 51a6b9f and 6196f21.

📒 Files selected for processing (1)
  • docs/1.docs/5.routing.md

📝 Walkthrough

Walkthrough

Documentation corrected to replace the deprecated defineNitroConfig import with defineConfig, eliminate duplicate route rule keys by using unique patterns (blog2/**, blog3/**, blog4/**), and add proxy route examples. These changes address the mismatch between documented and actual API usage.

Changes

Cohort / File(s) Summary
Routing Documentation
docs/1.docs/5.routing.md
Updated nitro.config code example: replaced defineNitroConfig with defineConfig, removed duplicate /blog/** route rules by using unique patterns (blog2/**, blog3/**, blog4/**), and added proxy route examples (/proxy/example, /proxy/**) to correct API usage and valid JavaScript object structure.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'docs: correct routing example code' follows conventional commits format with type prefix and clearly summarizes the documentation fix.
Description check ✅ Passed The PR description links to issue #3936 and marks documentation updates as completed, relating to the changeset's focus on correcting routing documentation.
Linked Issues check ✅ Passed The PR changes correctly address issue #3936 by replacing defineConfig with defineNitroConfig and fixing duplicate route keys (/blog/**) in the routing documentation example.
Out of Scope Changes check ✅ Passed All changes are scoped to correcting routing documentation examples in markdown files, directly addressing the linked issue #3936 without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 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.

@pkg-pr-new

pkg-pr-new Bot commented Jan 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitrojs/nitro@3937

commit: 51a6b9f

Comment thread docs/1.docs/5.routing.md Outdated

@pi0 pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@pi0
pi0 merged commit 5d51b7f into nitrojs:main Mar 17, 2026
6 of 8 checks passed
RihanArfan added a commit that referenced this pull request Apr 27, 2026
Co-authored-by: Rihan Arfan <me@file.properties>
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.

Documentation of routing API untested, doesn't align with reality

3 participants