config.ts (491B)
1 import { defineCollection, z } from 'astro:content'; 2 import { docsSchema, i18nSchema } from '@astrojs/starlight/schema'; 3 4 export const collections = { 5 docs: defineCollection({ 6 schema: docsSchema({ 7 extend: z.object({ 8 info: z.optional(z.array(z.object({ 9 title: z.optional(z.string()), 10 text: z.string() 11 }))), 12 description: z.optional(z.string()), 13 recipe: z.optional(z.boolean()) 14 }) 15 }) 16 }), 17 i18n: defineCollection({ type: 'data', schema: i18nSchema() }), 18 };