import { defineCollection, defineContentConfig, z } from '@nuxt/content'

export default defineContentConfig({
  collections: {
    posts: defineCollection({
      type: 'page',
      source: '**/*.md',
      schema: z.object({
        title: z.string(),
        published: z.string(),
        description: z.string().optional(),
        image: z.string().optional(),
        draft: z.boolean().optional(),
        pinned: z.boolean().optional(),
        tags: z.array(z.string()).optional(),
        author: z.string().optional(),
      }),
    }),
  },
})
