| 1 | import { glob } from "astro/loaders"; |
| 2 | import { z } from "astro/zod"; |
| 3 | import { defineCollection } from "astro:content"; |
| 4 | |
| 5 | const posts = defineCollection({ |
| 6 | loader: glob({ pattern: "**/*.md", base: "./src/posts" }), |
| 7 | schema: z.object({ |
| 8 | title: z.string(), |
| 9 | }), |
| 10 | }); |
| 11 | |
| 12 | export const collections = { posts }; |