From 261d89ebed13691e72312f44339063fee93130ac Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 30 Mar 2024 16:32:17 +0000 Subject: Astro initial commit --- src/content/config.ts | 19 +++++++++++++++++++ 1 file changed, 19 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..58dbc00 --- /dev/null +++ b/src/content/config.ts @@ -0,0 +1,19 @@ +import { defineCollection, z } from 'astro:content'; + +const dateSchema = z.object({ + year: z.number(), + month: z.number(), + day: z.number(), +}); + +const blog = defineCollection({ + type: 'content', + schema: z.object({ + title: z.string(), + description: z.string(), + pubDate: dateSchema, + updatedDate: z.optional(dateSchema), + }), +}); + +export const collections = { blog }; -- cgit v1.2.3