Skip to content

Commit 5347c7b

Browse files
committed
docs: update code samples
1 parent f7b51d8 commit 5347c7b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/content/docs/3.utils/1.query-collection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Here is a complete example of how to fetch list of documents in `docs` collectio
183183
```vue [index.vue]
184184
<script setup lang="ts">
185185
const { data: docs } = await useAsyncData('documents-list', () => {
186-
return queryContent('docs')
186+
return queryCollection('docs')
187187
.order('date', 'DESC')
188188
.select('title', 'path', 'description')
189189
.all()

docs/content/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ sections:
123123
```vue [pages/blog.vue]
124124
<script setup lang="ts">
125125
const { data: posts } = await useAsyncData('posts', () => {
126-
return queryContent('blog')
126+
return queryCollection('blog')
127127
.order('date', 'DESC')
128128
.select('title', 'path', 'description')
129129
.all()

0 commit comments

Comments
 (0)