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

export default defineContentConfig({
  collections: {
    blog: defineCollection({
      type: 'page',
      source: 'blog/**/**.md',
      schema: z.object({
        title: z.string(),
        slug: z.string(),
        date: z.string(),
        description: z.string()
      })
    }),

    fixed: defineCollection({
      type: 'page',
      source: 'fixed/**/**.md'
    }),

    art: defineCollection({
      type: 'page',
      source: 'art/**/**.md',
      schema: z.object({
        title: z.string(),
        slug: z.string(),
        thumb: z.string(),
        date: z.string()
      })
    }),

    projects: defineCollection({
      type: 'page',
      source: 'projects/**/**.md',
      schema: z.object({
        title: z.string(),
        slug: z.string(),
        description: z.string(),
        link: z.string().optional(),
        preview: z.string().optional(),
        tech: z.array(z.string()).default([])
      })
    }),
  },
  markdown: {
    tags: {
    }
  }
})