-
-
Notifications
You must be signed in to change notification settings - Fork 208
feat(core)!: routeService ignore "_" prefix files by default #2149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for rspress ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
We need to document it. |
Would |
what previous behavior? |
|
66d4ac3
to
dff53ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements automatic exclusion of files with underscore prefix from route generation, following Docusaurus partial MDX conventions. This allows developers to create partial/shared MDX components without needing to manually configure exclusion patterns.
- Adds
**/_*
pattern to default route exclusions to automatically ignore underscore-prefixed files - Adds test fixture for partial MDX file to validate the exclusion behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/core/src/node/route/RouteService.ts | Adds default exclusion pattern for underscore-prefixed files |
packages/core/src/node/route/fixtures/basic/guide/_d.mdx | Test fixture for partial MDX file to verify exclusion works |
dff53ef
to
d8f1c7a
Compare
Summary
Docusaurus has a Partial mdx convention, starting with '_', mainly used to exclude document fragments in convention-based routing.
import PartialExample from './_partial.mdx'
to replace
Related Issue
https://docusaurus.io/docs/markdown-features/react#importing-markdown
Checklist