From 322441a14450c61ba4cc16e69e1b761dda75f4f4 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 31 Aug 2023 10:37:26 -0500 Subject: [PATCH] metadata --- src/layouts/BaseLayout.astro | 1 + src/pages/posts/[...slug].astro | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 625b3b0..274d8a7 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -10,6 +10,7 @@ import "../styles/global.scss"; Michael Zhang + diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 8de62e4..91b5e03 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -23,9 +23,21 @@ let heroImage; if (heroImagePath) { heroImage = await getImage({ src: heroImagePath }); } +const datestamp = post.data.date.toLocaleDateString(undefined, { + year: "numeric", + month: "short", + day: "numeric", +}); --- + + + + + + +

{post.data.title}