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

export default defineContentConfig({
  collections: {
    projects: defineCollection({
      type: "data",
      source: "projects/**/index.yml",
      schema: z.object({
        order: z.number(),
        scope: z.enum(["hobby", "work"]),
        title: z.string(),
        link: z.url(),
        description: z.string(),
        summary: z.string(),
        technologies: z.array(z.string()),
        tasks: z.array(z.string()),
      }),
    }),
  },
});
