Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(docs): Add SEO description fallback for API reference pages

Sushmithamallesh8d02b1602fd2
diff --git a/docs/app/(home)/reference/[[...slug]]/page.tsx b/docs/app/(home)/reference/[[...slug]]/page.tsx
index 6d70444a8..30c506afc 100644
--- a/docs/app/(home)/reference/[[...slug]]/page.tsx
+++ b/docs/app/(home)/reference/[[...slug]]/page.tsx
@@ -92,11 +92,14 @@ export async function generateMetadata({
const page = referenceSource.getPage(slug);
if (!page) notFound();
- const ogImage = getOgImageUrl('reference', page.slugs, page.data.title, page.data.description);
+ // Use description if available, otherwise fall back to title for SEO
+ // This handles OpenAPI pages where description may be null in the spec
+ const description = page.data.description || page.data.title;
+ const ogImage = getOgImageUrl('reference', page.slugs, page.data.title, description);
return {
title: page.data.title,
- description: page.data.description,
+ description,
alternates: { canonical: page.url },
openGraph: { images: [ogImage] },
twitter: { card: 'summary_large_image', images: [ogImage] },