Files
librodrome/content.config.ts
2026-02-20 12:55:10 +01:00

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(),
}),
}),
},
})