Skip to content
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

Merged
merged 6 commits into from
Jul 21, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jul 20, 2021

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:

image

Then fixing it

Related PRs

#5173

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jul 20, 2021
@slorber slorber requested a review from lex111 as a code owner July 20, 2021 18:53
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 20, 2021
@HonkingGoose
Copy link
Contributor

@slorber I think your PR is missing a proper title?

@slorber slorber changed the title fix(v2): fix(v2): Fix MDX docs being considered as partials when siteDir match the _ prefix convention Jul 20, 2021
@netlify
Copy link

netlify bot commented Jul 20, 2021

✔️ [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

@github-actions
Copy link

github-actions bot commented Jul 20, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 88
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5199--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Jul 20, 2021

Size Change: +39.6 kB (+5%) 🔍

Total Size: 851 kB

Filename Size Change
website/build/assets/js/main.********.js 460 kB +540 B (0%)
website/build/tests/docs/index.html 20.3 kB +20.3 kB (new file) 🆕
website/build/tests/docs/standalone/index.html 18.8 kB +18.8 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 58.8 kB 0 B
website/build/assets/css/styles.********.css 89.1 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 62.3 kB -2 B (0%)
website/build/blog/index.html 26.3 kB -2 B (0%)
website/build/docs/index.html 40.2 kB -2 B (0%)
website/build/docs/installation/index.html 47.8 kB -2 B (0%)
website/build/index.html 27.3 kB -2 B (0%)

compressed-size-action

@slorber slorber merged commit 4d06f26 into master Jul 21, 2021
@slorber slorber deleted the slorber/isMDXPartial-bug branch August 17, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants