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)