diff --git a/app/api/posts/[slug]/route.ts b/app/api/posts/[slug]/route.ts index 75d2e33..d4329f7 100644 --- a/app/api/posts/[slug]/route.ts +++ b/app/api/posts/[slug]/route.ts @@ -6,4 +6,10 @@ export async function GET(request: NextRequest, {params}: { params: { slug: stri const slug = params.slug; const post = getPostBySlug(slug); return NextResponse.json(post); -} \ No newline at end of file +} + + +export async function generateStaticParams() { + const slugs = await getAllSlugs(); + return slugs.map((slug) => ({ slug })); +}