Remove unpublished notes from the main page. They will still be visible
if the URL is known.
This commit is contained in:
parent
7394d18492
commit
d26a99e13f
1 changed files with 1 additions and 1 deletions
|
|
@ -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 });
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue