From 7eaa9c689ac1a6d7a7807e5d9db77dc7b4719721 Mon Sep 17 00:00:00 2001 From: lew Date: Thu, 29 Jan 2026 01:35:55 +0000 Subject: [PATCH] feat: exclude draft posts from public static paths --- apps/www/src/pages/md/[slug].astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/src/pages/md/[slug].astro b/apps/www/src/pages/md/[slug].astro index 1b95763..1209de4 100644 --- a/apps/www/src/pages/md/[slug].astro +++ b/apps/www/src/pages/md/[slug].astro @@ -3,7 +3,7 @@ import { getCollection, render } from 'astro:content'; import Layout from '../../layouts/Layout.astro'; export async function getStaticPaths() { - const posts = await getCollection('posts'); + const posts = await getCollection('posts', ({ data }) => data.draft !== true); return posts.map(post => ({ params: { slug: post.id }, props: { post }