-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs: add note about non-deterministic sort order in collections #11908
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
docs: add note about non-deterministic sort order in collections #11908
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project 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
|
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.
Hi @davidumoru! I was sure we had already written about this! Turns out, it's in the Upgrade to v5/from legacy collections guidance, but not here on this page. 😅
Thank you for adding this helpful information in a place where more people will find it, and you'll find my suggestions below for making it fit within the flow of this new location!
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Thanks for the suggestions, just committed them. This version reads much better. |
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.
Thank you so much, this is a fantastic addition to this page and will help a lot of people! We appreciate you taking the time to contribute, and are happy to welcome you to Team Docs! 🥳
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.
LGTM! Thanks!
Description (required)
Added a note to the “Querying Collections” section of the Content Collections guide, explaining that the order of entries returned by
getCollection()
is non-deterministic and platform-dependent. This helps users understand that they should sort the results themselves if they need a specific order.Related issues & labels (optional)
getCollection
#11674improve or update documentation