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/layouts/BlogPost.astro | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'website/src/layouts') diff --git a/website/src/layouts/BlogPost.astro b/website/src/layouts/BlogPost.astro index 8639caa..3f7a999 100644 --- a/website/src/layouts/BlogPost.astro +++ b/website/src/layouts/BlogPost.astro @@ -9,11 +9,6 @@ type Props = CollectionEntry<'blog'>['data']; const { title, description, pubDate, updatedDate } = Astro.props; const canonicalUrl = new URL(Astro.url.pathname, Astro.site); - -const pubDateStr = `${pubDate.year}-${pubDate.month}-${pubDate.day}`; -const updatedDateStr = updatedDate ? - `${updatedDate.year}-${updatedDate.month}-${updatedDate.day}` - : pubDateStr; --- @@ -32,9 +27,9 @@ const updatedDateStr = updatedDate ? { updatedDate ? ( - Updated: . - Originally published: . - ) : Published: . + Updated: . + Originally published: . + ) : Published: . } -- cgit v1.2.3