From cd1dfa72ff3e010d6cba73b57bacaae934722ff9 Mon Sep 17 00:00:00 2001 From: Cassidy Williams <1454517+cassidoo@users.noreply.github.com> Date: Fri, 20 Oct 2023 22:44:00 -0500 Subject: [PATCH] Update date formatting in blog view --- src/pages/post/[slug].astro | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/post/[slug].astro b/src/pages/post/[slug].astro index 1bc0731..a362767 100644 --- a/src/pages/post/[slug].astro +++ b/src/pages/post/[slug].astro @@ -13,6 +13,15 @@ export async function getStaticPaths() { const { post } = Astro.props; +post.frontmatter.added = new Date(post.frontmatter.added).toLocaleDateString( + "en-us", + { + year: "numeric", + month: "short", + day: "numeric", + } +); + const { Content, frontmatter: { title, added, updated, tags, excerpt },