From 9e6eccb1bf9c2fa7ab52660267cb08539ff949a5 Mon Sep 17 00:00:00 2001 From: Frank van Puffelen Date: Sun, 7 Jul 2024 17:12:07 -0700 Subject: [PATCH] Only render notes if there's a pubDate --- src/layouts/BlogPost.astro | 1 - src/pages/[...slug].astro | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index 7f91584..e67b2b3 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -8,7 +8,6 @@ import FormattedDate from '../components/FormattedDate.astro'; type Props = CollectionEntry<'blog'>['data']; const { title, description, pubDate, updatedDate, heroImage } = Astro.props; -console.log('Astro.props', Astro.props) --- diff --git a/src/pages/[...slug].astro b/src/pages/[...slug].astro index cd63598..c40c744 100644 --- a/src/pages/[...slug].astro +++ b/src/pages/[...slug].astro @@ -21,6 +21,8 @@ const pubDate = post.frontmatter.pubDate ? new Date(post.frontmatter.pubDate) : // * [ ] Determine pubDate based on note type --- +(pubDate && - \ No newline at end of file + +) \ No newline at end of file