personal site
1import { defineCollection } from "astro:content";
2
3import { glob } from "astro/loaders";
4
5import { z } from "astro/zod";
6
7const blog = defineCollection({
8 loader: glob({ base: "./src/content/blog", pattern: "**/*.{md,mdx}" }),
9 schema: z.object({
10 title: z.string()
11 // description: z.string(),
12 // pubDate: z.coerce.date(),
13 // updatedDate: z.coerce.date().optional()
14 })
15});
16
17export const collections = { blog };