// index.vue
const { data: posts } = await useAsyncData('home', () => {
return queryCollection('blog')
.where('draft', '=', 0)
.select('slug', 'title', 'description', 'date', 'image', 'category')
.order('date', 'DESC')
.limit(2)
.all()
})
// index.vue
const { data: posts } = await useAsyncData('home', () => {
return queryCollection('blog')
.where('draft', '=', 0)
.select('slug', 'title', 'description', 'date', 'image', 'category')
.order('date', 'DESC')
.limit(2)
.all()
})