{title}
diff --git a/src/pages/notes/[...slug].astro b/src/pages/notes/[...slug].astro
index 619c26a..d0a6303 100644
--- a/src/pages/notes/[...slug].astro
+++ b/src/pages/notes/[...slug].astro
@@ -12,11 +12,13 @@ export async function getStaticPaths() {
return data.headings;
})
);
+ if (import.meta.env.DEV || post.data.draft !== true) {
+ return posts.map((post, index) => ({
+ params: { slug: post.slug },
+ props: { post, headings: headings[index] },
+ }));
+ }
- return posts.map((post, index) => ({
- params: { slug: post.slug },
- props: { post, headings: headings[index] },
- }));
}
type Props = {
diff --git a/src/pages/notes/index.astro b/src/pages/notes/index.astro
index a7e810c..0a32aa9 100644
--- a/src/pages/notes/index.astro
+++ b/src/pages/notes/index.astro
@@ -22,7 +22,8 @@ const posts = (await getCollection('blog')).sort(