39 lines
889 B
TypeScript
39 lines
889 B
TypeScript
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
|
|
|
|
export default defineContentConfig({
|
|
collections: {
|
|
docs: defineCollection({
|
|
type: 'page',
|
|
source: {
|
|
include: 'docs/**'
|
|
},
|
|
schema: z.object({
|
|
rawbody: z.string(),
|
|
links: z.array(z.object({
|
|
label: z.string(),
|
|
icon: z.string(),
|
|
to: z.string(),
|
|
target: z.string().optional()
|
|
})).optional()
|
|
})
|
|
}),
|
|
blog: defineCollection({
|
|
type: 'page',
|
|
source: {
|
|
include: 'blog/**'
|
|
},
|
|
schema: z.object({
|
|
rawbody: z.string(),
|
|
img: z.string(),
|
|
date: z.string(),
|
|
links: z.array(z.object({
|
|
label: z.string(),
|
|
icon: z.string(),
|
|
to: z.string(),
|
|
target: z.string().optional()
|
|
})).optional()
|
|
})
|
|
})
|
|
}
|
|
})
|