Remove unpublished notes from the main page. They will still be visible

if the URL is known.
This commit is contained in:
Benjamin A. Shelton 2026-06-07 20:29:35 -06:00
commit d26a99e13f
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -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 });
};