From 25b2ae0a6363cabc8952fe6c8e80f170be506807 Mon Sep 17 00:00:00 2001 From: Vlad-Stefan Harbuz Date: Thu, 19 Dec 2024 23:06:45 +0000 Subject: [PATCH] Blog: build not-yet-public posts --- src/pages/blog/[slug].astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/blog/[slug].astro b/src/pages/blog/[slug].astro index 31c8d4b..df2d03f 100644 --- a/src/pages/blog/[slug].astro +++ b/src/pages/blog/[slug].astro @@ -25,7 +25,7 @@ const ARTICLE_QUERY = `*[_type == "article" && slug.current == $slug][0]{ author->{name, slug, avatar} }`; const article = await sanityClient.fetch(ARTICLE_QUERY, Astro.params); -if (!article || dayjs(article.publishDateTime).isAfter(dayjs().utc())) { +if (!article) { return Astro.rewrite('/404'); }