-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
fix(v2): Fix MDX docs being considered as partials when siteDir match the _ prefix convention #5199
Conversation
@slorber I think your PR is missing a proper title? |
✔️ [V2] 🔨 Explore the source changes: 1a5b9eb 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60f809e3cfcb150ad420e19b 😎 Browse the preview: https://deploy-preview-5199--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5199--docusaurus-2.netlify.app/ |
Size Change: +39.6 kB (+5%) 🔍 Total Size: 851 kB
ℹ️ View Unchanged
|
Motivation
Trying to fix bug reported here: #5181 (reply in thread)
When site dir or docs dir contain a _ prefix, all subfiles are wrongly considered as MDX partials. The _ prefix should only be considered inside the content folder, and parent folders should be ignored.
Also refactor the _dogfooding folder that we use extensively in this PR as e2e tests, preparing for more similar tests
Also fix page plugin ignoring options.routeBasePath (probably not very used setup but still, dogfooding permitted to surface this bug)
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
Dogfooding: move website dogfooding plugin instances to a folder starting with _ for making the failing test case:
Then fixing it
Related PRs
#5173