From ea96f40f7c0c535bc4c7d747d347893b78acb6fb Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Mon, 15 Jul 2024 16:14:08 +0100 Subject: Blog posts use Date type pubDate --- website/src/content/config.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'website/src/content/config.ts') diff --git a/website/src/content/config.ts b/website/src/content/config.ts index 8bcd92d..dfdf403 100644 --- a/website/src/content/config.ts +++ b/website/src/content/config.ts @@ -1,19 +1,13 @@ 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(), hidden: z.optional(z.boolean()), description: z.string(), - pubDate: dateSchema, - updatedDate: z.optional(dateSchema), + pubDate: z.date(), + updatedDate: z.optional(z.date()), }), }); -- cgit v1.2.3