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: pass config instead of settings to content layer loaders #11862

Merged
merged 3 commits into from
Aug 28, 2024

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Aug 28, 2024

Changes

Pass AstroConfig to content layer loaders, instead of AstroSettings. The main reason loaders needed settintgs was to access the config object, and AstroSettings is meant to be an internal object. The one exception is contentEntryTypes and dataEntryTypes, which are properties of settings. These are used by glob and other loaders that need to do rendering. As they're no longer available on settings, laoders are now passed a new object, which is entryTypes, which is a Map of extension to entry type.

Fixes PLT-2442

Testing

Tests updated

Docs

The experimental flag docs don't mention the settings object. The changeset highlights that this is a breaking change. I will also update the RFC.

Copy link

changeset-bot bot commented Aug 28, 2024

🦋 Changeset detected

Latest commit: bcee114

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 pkg: astro Related to the core `astro` package (scope) docs pr labels Aug 28, 2024
.changeset/chilled-timers-shave.md Outdated Show resolved Hide resolved
@ascorbic ascorbic merged commit 0e35afe into main Aug 28, 2024
14 checks passed
@ascorbic ascorbic deleted the cl-settings branch August 28, 2024 16:05
@astrobot-houston astrobot-houston mentioned this pull request Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs pr pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants