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

feat: allow arrays of patterns for glob loader #11952

Merged
merged 3 commits into from
Sep 9, 2024
Merged

feat: allow arrays of patterns for glob loader #11952

merged 3 commits into from
Sep 9, 2024

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Sep 9, 2024

Changes

Adds support for passing arrays of patterns to glob() as well as strings. This is something that people have requested, but the immediate reason to add it now is to make it easier to add backwards-compatibility for existing collections, which use arrays to handle underscored directories and files.

Testing

Added fixtures and tests. Claude is so good at markdown fixtures.

Docs

This will need including in the content layer docs. Changeset includes example usage.

Copy link

changeset-bot bot commented Sep 9, 2024

🦋 Changeset detected

Latest commit: e30c3ce

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 9, 2024
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Change set approved with tiny comments from docs!

Will take this example/pattern into new content collections guide docs to showcase usage, but this should also be added where Loader API docs are added. (Which is only a page stub right now)

.changeset/honest-dingos-add.md Outdated Show resolved Hide resolved
.changeset/honest-dingos-add.md Outdated Show resolved Hide resolved
Co-authored-by: Sarah Rainsberger <[email protected]>
@ascorbic ascorbic merged commit 50a0146 into next Sep 9, 2024
13 checks passed
@ascorbic ascorbic deleted the glob-array branch September 9, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants