25 lines
595 B
TypeScript
25 lines
595 B
TypeScript
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
|
|
|
|
export default defineContentConfig({
|
|
collections: {
|
|
book: defineCollection({
|
|
type: 'page',
|
|
source: 'book/**/*.md',
|
|
schema: z.object({
|
|
title: z.string(),
|
|
description: z.string().optional(),
|
|
order: z.number(),
|
|
readingTime: z.string().optional(),
|
|
}),
|
|
}),
|
|
pages: defineCollection({
|
|
type: 'page',
|
|
source: 'pages/**/*.md',
|
|
schema: z.object({
|
|
title: z.string(),
|
|
description: z.string().optional(),
|
|
}),
|
|
}),
|
|
},
|
|
})
|