-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Content Layer API inserts scripts from all collection entries into every generated page #12024
Comments
Hello @jurajkapsz. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Should I rather create an Astro 5 beta minimal reproduction, if any? Will be Content Layer API non-experimental also for Astro v4? |
This should be fixed with #12014. It will be in a release soon. Thanks for the report! |
OK, thanks very much @ascorbic ! |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Switched to Content Layer API, having content collections with
mdx
files that include and call various [astro] components in their content.[astro] components can have scripts and styles.
When browsing website, I see scripts basically from all components included and executed on every page, even if they are not part of given page content.
What's the expected result?
Only those assets should be part of the page that are included in content or template. This worked with
Content Collections
.Link to Minimal Reproducible Example
Participation
The text was updated successfully, but these errors were encountered: