-
-
Notifications
You must be signed in to change notification settings - Fork 675
How to list all available content #3030
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
My question woul'd be similar. |
@biroplane @Rednas83 You can do a few things like that: const { data: navigation } = await useAsyncData('navigation', () => {
return Promise.all([
queryCollectionNavigation('docs'),
queryCollectionNavigation('blog')
])
}, {
transform: data => data.flat()
})
const { data: files } = useLazyAsyncData('search', () => {
return Promise.all([
queryCollectionSearchSections('docs'),
queryCollectionSearchSections('blog')
])
}, {
server: false,
transform: data => data.flat()
}) |
When called directly from app.js it still errors but with more clear errors.
client
|
@Rednas83 By design, navigation works only for page collections. Generating navigation requires some files to be defined in the schema, which are already defined in the page collection. |
I guess that makes sense, but is there also a way to list all the data collections defined inside the schema? If not, can you please consider adding support for it? Perhaps something like
|
Any thoughts? |
Problem
Not able to get all the content in a collection or from multiple collections at once.
Possible solution
Alternatives
Tried grabbing it from ssrContext but without succes

Additional context
With V2 it was possible to do something like
await queryContent().find()
The text was updated successfully, but these errors were encountered: