Repository navigation
fix(content-plugins): don't load the non-Markdown files of a folder named like a Markdown file - #13038
Open
slorber wants to merge 1 commit into
Open
fix(content-plugins): don't load the non-Markdown files of a folder named like a Markdown file#13038slorber wants to merge 1 commit into
slorber wants to merge 1 commit into
Conversation
…amed like a Markdown file
Tinyglobby expands every pattern with `/**` by default, unlike globby:
`**/*.{md,mdx}` matched `folder.md/notes.txt`, which broke the build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 seconds. View limit details
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. |
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The docs, blog and pages plugins loaded every file of a folder whose name matches their
includepatterns, likedocs/folder.md/notes.txt, which broke the site build. Tinyglobby appends/**to every pattern by default (expandDirectories: true), unlike globby that we used before #11042.This PR passes
expandDirectories: falsewhen globbing the content files of the 3 plugins, and addsexpandDirectoriesto theGlobOptionsof@docusaurus/glob(same change as #13012).excludepatterns behave the same: tinyglobby still skips a whole directory matched by an ignore pattern (exclude: ['drafts']skipsdrafts/post.md).We don't change the default of
@docusaurus/globglob():safeGlob()callers (translations extraction,write-heading-ids) pass directories and rely on their expansion.Test Plan
folder.md/notes.txtis not loaded anymore,folder.md/doc.mdstill isdocs/foo.md/notes.txt,blog/2024-01-01-post.md/notes.txtandsrc/pages/page.md/notes.txt: the bundle fails to compile before, and compiles afterTest links
Deploy preview: https://deploy-preview-13038--docusaurus-2.netlify.app/
Related issues/PRs
🤖 Generated with Claude Code