-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Clarify content collection and page routing for Astro v5 #10370
Conversation
Add note that underscore exclusion is only for `src/pages`.
`posts` sounds too close to a content collection and may give a wrong impression.
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
This is looking pretty good @anaxite ! Is there a reason you still have this marked as a draft? Are you doing more with it? Also noting that I will add something to the v5 upgrade guide in case people were using the built-in prefix trick that was supported in the old content collections API |
I'm doing a last check, and then it'll be out of draft :) |
Noting that the Upgrade guide should also something like the following changes to the Legacy collections introduction:
(for readability):
|
Alright, feel free to go ahead with the upgrade guide! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under #updating-existing-collections, on step 2, would it be worth adding a sentence like "Edit the pattern
depending on what files you want to exclude." or is that too wordy? I'm thinking that's another signal that behavior has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a bad idea, but you're right, it's starting to get a bit much for something that probably most people will not have, and therefore an extra thought that might get put in their head? "Wait, exclude?"
Can we try as-is to start, as already a definite improvement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I like the addition!
* i18n(fr): update `guides/upgrade-to/v5.mdx` See #10370 * fix link anchor --------- Co-authored-by: Thomas Bonnet <[email protected]>
See #10370 Co-authored-by: Thomas Bonnet <[email protected]>
Summary
This pull request reviews and edits wording around page and content collection routing to better explain file exclusion in 5.0.
Description
In 5.0, content collections don't exclude any files by default. Particular globs are needed to exclude a file, which isn't necessarily clear. This change may also create confusion when comparing the behavior to page routing, which does exclude underscores.
This PR attempts to clarify the behavior change, and make content collection behavior stand out more compared to page routing.
Related issues & labels
code snippet update
improve documentation