Skip to content

Commit d4e46a7

Browse files
committed
docs(home): rename collection
1 parent cb33501 commit d4e46a7

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

docs/app/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
const siteConfig = useSiteConfig()
33
4-
const { data: page } = await useAsyncData('index', () => queryCollection('content').first())
4+
const { data: page } = await useAsyncData('index', () => queryCollection('home').first())
55
if (!page.value) {
66
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
77
}

docs/content.config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import { defineCollection, z } from '@nuxt/content'
33
export const collections = {
44
docs: defineCollection({
55
type: 'page',
6-
source: {
7-
include: 'docs/**',
8-
prefix: '/docs',
9-
},
6+
source: 'docs/**',
107
schema: z.object({
118
links: z.array(z.object({
129
label: z.string(),
@@ -20,7 +17,7 @@ export const collections = {
2017
})).optional(),
2118
}),
2219
}),
23-
content: defineCollection({
20+
home: defineCollection({
2421
type: 'page',
2522
source: 'index.yml',
2623
schema: z.object({

0 commit comments

Comments
 (0)