From d26a99e13f8d55339bc919ac5fac27f40d9aa506 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Shelton" Date: Sun, 7 Jun 2026 20:29:35 -0600 Subject: [PATCH] Remove unpublished notes from the main page. They will still be visible if the URL is known. --- src/pages/[...page].astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/[...page].astro b/src/pages/[...page].astro index 64984ba..90e4c77 100644 --- a/src/pages/[...page].astro +++ b/src/pages/[...page].astro @@ -15,7 +15,7 @@ const base = import.meta.env.BASE_URL; export async function getStaticPaths({ paginate }) { const notes = (await getCollection('notes')).sort( (a: CollectionEntry<'notes'>, b: CollectionEntry<'notes'>) => b.data.date.valueOf() - a.data.date.valueOf(), - ); + ).filter((note) => (note.data.published)); return paginate(notes, { pageSize: 6 }); };