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/components/PostElement.astro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/components/PostElement.astro') diff --git a/src/components/PostElement.astro b/src/components/PostElement.astro index 85320ee..8b4b7c4 100644 --- a/src/components/PostElement.astro +++ b/src/components/PostElement.astro @@ -8,7 +8,9 @@ type Props = { const { post } = Astro.props; const { remarkPluginFrontmatter } = await post.render(); -const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"); + +const formattedDate = dayjs(post.data.datePublished.toString()).format("MMMM DD, YYYY"); +const datePublished = post.data.datePublished.toISOString(); ---