From 17f9a467d7c0f427ae9d1cd579988a26615311c7 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 14 Jun 2025 11:25:17 +0000 Subject: refactor: update blog post date handling and schema - Replaced `pubDate` with `datePublished` in blog post components for consistency. - Updated sorting logic in blog sections to use `datePublished`. - Enhanced blog post schema to include `dateModified` for better structured data representation. - Adjusted various blog markdown files to reflect the new date fields. --- src/content/config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/content/config.ts') diff --git a/src/content/config.ts b/src/content/config.ts index 3467bda..d7f5f86 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -4,11 +4,12 @@ const blog = defineCollection({ type: "content", schema: z.object({ author: z.string(), + dateModified: z.coerce.date(), + datePublished: z.coerce.date(), description: z.string(), draft: z.optional(z.boolean()), - pubDate: z.coerce.date(), - title: z.string(), lang: z.string(), + title: z.string(), }), }); -- cgit v1.2.3