import { defineCollection } from "astro:content"; import { glob } from "astro/loaders"; import { z } from "astro/zod"; const blog = defineCollection({ loader: glob({ base: "./src/content/blog", pattern: "**/*.{md,mdx}" }), schema: ({ image }) => z.object({ title: z.string(), description: z.string(), pubDate: z.coerce.date(), tags: z.array(z.string()), updatedDate: z.coerce.date().optional(), illustration: z.optional(image()), }), }); export const collections = { blog };