Skip to content

Commit

Permalink
docs: update code samples
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 12, 2024
1 parent f7b51d8 commit 5347c7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/content/docs/3.utils/1.query-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Here is a complete example of how to fetch list of documents in `docs` collectio
```vue [index.vue]
<script setup lang="ts">
const { data: docs } = await useAsyncData('documents-list', () => {
return queryContent('docs')
return queryCollection('docs')
.order('date', 'DESC')
.select('title', 'path', 'description')
.all()
Expand Down
2 changes: 1 addition & 1 deletion docs/content/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ sections:
```vue [pages/blog.vue]
<script setup lang="ts">
const { data: posts } = await useAsyncData('posts', () => {
return queryContent('blog')
return queryCollection('blog')
.order('date', 'DESC')
.select('title', 'path', 'description')
.all()
Expand Down

0 comments on commit 5347c7b

Please sign in to comment.