From eaef10c8241e14580545fb4c02de08918614a12e Mon Sep 17 00:00:00 2001 From: kbot Date: Wed, 3 Jun 2026 23:08:12 -0500 Subject: [PATCH] fix(tags): guard generateStaticParams against empty content dir --- app/tags/[tag]/page.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/tags/[tag]/page.tsx b/app/tags/[tag]/page.tsx index d10475b..2635d23 100644 --- a/app/tags/[tag]/page.tsx +++ b/app/tags/[tag]/page.tsx @@ -12,6 +12,9 @@ export const dynamic = 'force-static' export async function generateStaticParams() { const tags = await getAllTags() + if (tags.length === 0) { + return [{ tag: '__no-tags__' }] + } return tags.map((tag) => ({ tag: tag.slug })) } @@ -27,6 +30,9 @@ export async function generateMetadata({ params }: TagPageProps): Promise item.slug === slug)