const { data: page } = await useAsyncData(route.path, async () => {
let content = await queryCollection('docs')
.where('path', 'LIKE', route.path)
.first()
if (!content) {
console.warn(
`No content found for ${route.path}, falling back to navigation.`
)
content = await queryCollection('docs').path(route.path).first()
}
return content
})
const { data: page } = await useAsyncData(route.path, async () => {
let content = await queryCollection('docs')
.where('path', 'LIKE', route.path)
.first()
if (!content) {
console.warn(
`No content found for ${route.path}, falling back to navigation.`
)
content = await queryCollection('docs').path(route.path).first()
}
return content
})