From b5587041b11da90262ff865ac86ea30801c0b718 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 25 Nov 2023 13:43:11 -0600 Subject: [PATCH] Post layout frontmatter destructuring, space joined tags --- src/layouts/Post.astro | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/layouts/Post.astro b/src/layouts/Post.astro index 2487ee3..9d71c31 100644 --- a/src/layouts/Post.astro +++ b/src/layouts/Post.astro @@ -5,13 +5,14 @@ interface Props { title: string; url: string; description: string; - pubDate: string; + pubDate: string; } -const { title, description, url, pubDate } = Astro.props; +const { frontmatter } = Astro.props; +const { title, url, pubDate, tags } = frontmatter; --- - +

@@ -26,9 +27,9 @@ const { title, description, url, pubDate } = Astro.props; {pubDate} - - - + + { tags.join(" ")} +
@@ -48,15 +49,6 @@ const { title, description, url, pubDate } = Astro.props;

-
- - - - - - - -