Show unpublished articles only if development mode is not enabled.

This commit is contained in:
Benjamin A. Shelton 2026-12-05 22:16:29 -07:00
commit ed003faed5
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -16,7 +16,7 @@ const base = import.meta.env.BASE_URL;
export const getStaticPaths = (async ({ 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));
).filter((note) => (note.data.published || import.meta.env.DEV));
return paginate(notes, { pageSize: 6 });
}) satisfies GetStaticPaths;