docs: update to @nuxt/content@next (#2379)

Co-authored-by: Farnabaz <farnabaz@gmail.com>
This commit is contained in:
Benjamin Canac
2024-10-31 14:16:26 +01:00
committed by GitHub
parent 8669553ea4
commit 50918a8128
16 changed files with 364 additions and 311 deletions

27
docs/content.config.ts Normal file
View File

@@ -0,0 +1,27 @@
import { defineCollection, z } from '@nuxt/content'
export const collections = {
content: defineCollection({
type: 'page',
source: '**/*',
schema: z.object({
links: z.array(z.object({
label: z.string(),
icon: z.string(),
avatar: z.object({
src: z.string(),
alt: z.string()
}).optional(),
to: z.string(),
target: z.string().optional()
})),
select: z.object({
items: z.array(z.object({
label: z.string(),
icon: z.string(),
to: z.string()
}))
})
})
})
}