diff --git a/src/app/[[...slug]]/page.tsx b/src/app/[[...slug]]/page.tsx index bb420adff..69a069e64 100644 --- a/src/app/[[...slug]]/page.tsx +++ b/src/app/[[...slug]]/page.tsx @@ -68,7 +68,7 @@ export async function generateMetadata({ card: 'summary_large_image', }, alternates: { - canonical: `${BASE_URL}/docs/${doc.slug}`, + canonical: doc.slug ? `${BASE_URL}/docs/${doc.slug}` : `${BASE_URL}/docs`, }, } }