Skip to content

Commit

Permalink
docs(home): rename collection
Browse files Browse the repository at this point in the history
  • Loading branch information
larbish committed Nov 20, 2024
1 parent cb33501 commit d4e46a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/app/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
const siteConfig = useSiteConfig()
const { data: page } = await useAsyncData('index', () => queryCollection('content').first())
const { data: page } = await useAsyncData('index', () => queryCollection('home').first())
if (!page.value) {
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
}
Expand Down
7 changes: 2 additions & 5 deletions docs/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { defineCollection, z } from '@nuxt/content'
export const collections = {
docs: defineCollection({
type: 'page',
source: {
include: 'docs/**',
prefix: '/docs',
},
source: 'docs/**',
schema: z.object({
links: z.array(z.object({
label: z.string(),
Expand All @@ -20,7 +17,7 @@ export const collections = {
})).optional(),
}),
}),
content: defineCollection({
home: defineCollection({
type: 'page',
source: 'index.yml',
schema: z.object({
Expand Down

0 comments on commit d4e46a7

Please sign in to comment.