// Import utilities from `astro:content` import { defineCollection } from "astro:content"; import { glob } from "astro/loaders"; import { z } from "astro/zod"; // Define a `loader` and `schema` for each collection const postsCollection = defineCollection({ loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/posts" }), schema: z.object({ title: z.string(), pubDate: z.date(), tags: z.array(z.string()), draft: z.boolean().optional(), ogImage: z.string().optional(), bskyPostId: z.string().optional(), }), }); // Export a single `collections` object to register your collection(s) export const collections = { posts: postsCollection, };