From 22e353c04c1d15805be93e6922b45e9372415d8f Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 6 Jul 2026 21:53:18 -0400 Subject: update astro --- src/content.config.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/content.config.ts (limited to 'src/content.config.ts') diff --git a/src/content.config.ts b/src/content.config.ts new file mode 100644 index 0000000..4ba5c7c --- /dev/null +++ b/src/content.config.ts @@ -0,0 +1,18 @@ +import { defineCollection } from "astro:content"; +import { z } from 'astro/zod'; +import { glob } from 'astro/loaders'; +import { rssSchema } from '@astrojs/rss'; + +const blogCollection = defineCollection({ + loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: "./src/content/blog" }), + schema: z.object({ + title: z.string(), + description: z.string(), + pubDate: z.date(), + tags: z.array(z.string()), + }), +}); + +export const collections = { + blog: blogCollection, +}; -- cgit v1.2.3