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.

docs: Rename Examples → Cookbooks across entire docs site

Sushmithamalleshb72046149541
diff --git a/docs/app/(home)/cookbooks/[[...slug]]/page.tsx b/docs/app/(home)/cookbooks/[[...slug]]/page.tsx
new file mode 100644
index 000000000..2608bed31
--- /dev/null
+++ b/docs/app/(home)/cookbooks/[[...slug]]/page.tsx
@@ -0,0 +1,6 @@
+import { cookbooksSource } from '@/lib/source';
+import { createDocsPage, createGenerateStaticParams, createGenerateMetadata } from '@/lib/create-docs-page';
+
+export default createDocsPage(cookbooksSource);
+export const generateStaticParams = createGenerateStaticParams(cookbooksSource);
+export const generateMetadata = createGenerateMetadata(cookbooksSource, 'cookbooks');
diff --git a/docs/app/(home)/cookbooks/layout.tsx b/docs/app/(home)/cookbooks/layout.tsx
new file mode 100644
index 000000000..3973aee27
--- /dev/null
+++ b/docs/app/(home)/cookbooks/layout.tsx
@@ -0,0 +1,4 @@
+import { cookbooksSource } from '@/lib/source';
+import { createDocsLayout } from '@/lib/create-docs-layout';
+
+export default createDocsLayout(cookbooksSource);
diff --git a/docs/app/(home)/examples/[[...slug]]/page.tsx b/docs/app/(home)/examples/[[...slug]]/page.tsx
deleted file mode 100644
index e53e120c6..000000000
--- a/docs/app/(home)/examples/[[...slug]]/page.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import { examplesSource } from '@/lib/source';
-import { createDocsPage, createGenerateStaticParams, createGenerateMetadata } from '@/lib/create-docs-page';
-
-export default createDocsPage(examplesSource);
-export const generateStaticParams = createGenerateStaticParams(examplesSource);
-export const generateMetadata = createGenerateMetadata(examplesSource, 'examples');
diff --git a/docs/app/(home)/examples/layout.tsx b/docs/app/(home)/examples/layout.tsx
deleted file mode 100644
index 41604cf81..000000000
--- a/docs/app/(home)/examples/layout.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-import { examplesSource } from '@/lib/source';
-import { createDocsLayout } from '@/lib/create-docs-layout';
-
-export default createDocsLayout(examplesSource);
diff --git a/docs/app/api/search/route.ts b/docs/app/api/search/route.ts
index 255cf2b94..deb44ee8e 100644
--- a/docs/app/api/search/route.ts
+++ b/docs/app/api/search/route.ts
@@ -1,5 +1,5 @@
// Use direct imports from collections to avoid top-level await in lib/source.ts
-import { docs, examples, toolkits } from 'fumadocs-mdx:collections/server';
+import { docs, cookbooks, toolkits } from 'fumadocs-mdx:collections/server';
import { createSearchAPI } from 'fumadocs-core/search/server';
import { loader } from 'fumadocs-core/source';
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
@@ -11,9 +11,9 @@ const docsSource = loader({
plugins: [lucideIconsPlugin()],
});
-const examplesSource = loader({
- baseUrl: '/examples',
- source: examples.toFumadocsSource(),
+const cookbooksSource = loader({
+ baseUrl: '/cookbooks',
+ source: cookbooks.toFumadocsSource(),
plugins: [lucideIconsPlugin()],
});
@@ -25,7 +25,7 @@ const toolkitsSource = loader({
const allPages = [
...docsSource.getPages(),
- ...examplesSource.getPages(),
+ ...cookbooksSource.getPages(),
...toolkitsSource.getPages(),
];
diff --git a/docs/app/llms-full.txt/route.ts b/docs/app/llms-full.txt/route.ts
index 3829aebd8..38b8de078 100644
--- a/docs/app/llms-full.txt/route.ts
+++ b/docs/app/llms-full.txt/route.ts
@@ -1,4 +1,4 @@
-import { getLLMText, source, examplesSource, referenceSource, toolkitsSource } from '@/lib/source';
+import { getLLMText, source, cookbooksSource, referenceSource, toolkitsSource } from '@/lib/source';
import type { ReactNode } from 'react';
export const revalidate = false;
@@ -98,9 +98,9 @@ export async function GET() {
source.pageTree.children as TreeNode[]
);
- const [docsResults, examplesResults, referenceResults, toolkitsResults] = await Promise.all([
+ const [docsResults, cookbooksResults, referenceResults, toolkitsResults] = await Promise.all([
getTextForPages(orderedDocsPages),
- getTextForPages(examplesSource.getPages() as PageLike[]),
+ getTextForPages(cookbooksSource.getPages() as PageLike[]),
getTextForPages(referenceSource.getPages() as PageLike[]),
getTextForPages(toolkitsSource.getPages() as PageLike[]),
]);
@@ -108,8 +108,8 @@ export async function GET() {
const results = [
'# Composio Documentation\n\n> Composio powers 800+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.\n\n# Documentation\n',
...docsResults,
- '\n# Examples\n',
- ...examplesResults,
+ '\n# Cookbooks\n',
+ ...cookbooksResults,
'\n# API Reference\n',
...referenceResults,
'\n# Toolkits\n',
diff --git a/docs/app/llms.mdx/[[...slug]]/route.ts b/docs/app/llms.mdx/[[...slug]]/route.ts
index 3dea85e64..7779c3beb 100644
--- a/docs/app/llms.mdx/[[...slug]]/route.ts
+++ b/docs/app/llms.mdx/[[...slug]]/route.ts
@@ -1,7 +1,7 @@
import {
source,
getReferenceSource,
- examplesSource,
+ cookbooksSource,
toolkitsSource,
changelogEntries,
slugToDate,
@@ -481,7 +481,7 @@ async function openapiPageToMarkdown(
// Note: 'reference' is handled specially below with async getReferenceSource()
const sources = [
{ prefix: 'docs', source },
- { prefix: 'examples', source: examplesSource },
+ { prefix: 'cookbooks', source: cookbooksSource },
{ prefix: 'toolkits', source: toolkitsSource },
];
diff --git a/docs/app/llms.txt/route.ts b/docs/app/llms.txt/route.ts
index ad13eddae..addecb254 100644
--- a/docs/app/llms.txt/route.ts
+++ b/docs/app/llms.txt/route.ts
@@ -1,4 +1,4 @@
-import { source, examplesSource, referenceSource, toolkitsSource } from '@/lib/source';
+import { source, cookbooksSource, referenceSource, toolkitsSource } from '@/lib/source';
import type { ReactNode } from 'react';
export const revalidate = false;
@@ -83,7 +83,7 @@ export async function GET() {
try {
const docsTree = walkPageTree(source.pageTree.children as TreeNode[]);
- const examplesPages = examplesSource.getPages();
+ const cookbooksPages = cookbooksSource.getPages();
const referencePages = referenceSource.getPages();
const toolkitsPages = toolkitsSource.getPages();
@@ -93,9 +93,9 @@ export async function GET() {
${docsTree}
-## Examples
+## Cookbooks
-${examplesPages.map(formatPage).join('\n')}
+${cookbooksPages.map(formatPage).join('\n')}
## API Reference
diff --git a/docs/app/not-found.tsx b/docs/app/not-found.tsx
index e583abfcc..9dd2ce6e7 100644
--- a/docs/app/not-found.tsx
+++ b/docs/app/not-found.tsx
@@ -85,8 +85,8 @@ export default async function NotFound() {
<Link href="/toolkits" className="hover:text-fd-foreground transition-colors">
Toolkits
</Link>
- <Link href="/examples" className="hover:text-fd-foreground transition-colors">
- Examples
+ <Link href="/cookbooks" className="hover:text-fd-foreground transition-colors">
+ Cookbooks
</Link>
<Link href="/reference" className="hover:text-fd-foreground transition-colors">
API Reference
diff --git a/docs/app/sitemap.ts b/docs/app/sitemap.ts
index 2f159863b..e7d72d2d5 100644
--- a/docs/app/sitemap.ts
+++ b/docs/app/sitemap.ts
@@ -2,7 +2,7 @@ import type { MetadataRoute } from 'next';
import {
source,
getReferenceSource,
- examplesSource,
+ cookbooksSource,
toolkitsSource,
changelogEntries,
dateToChangelogUrl,
@@ -22,7 +22,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
url: `${baseUrl}${page.url}`,
}));
- const examplesPages = examplesSource.getPages().map((page) => ({
+ const cookbooksPages = cookbooksSource.getPages().map((page) => ({
url: `${baseUrl}${page.url}`,
}));
@@ -47,7 +47,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
{ url: `${baseUrl}/docs/changelog` },
...docsPages,
...referencePages,
- ...examplesPages,
+ ...cookbooksPages,
...toolkitsMdxPages,
...toolkitsJsonPages,
...changelogPages,
diff --git a/docs/components/nav-tabs.tsx b/docs/components/nav-tabs.tsx
index f4aaefbe9..abd9b9713 100644
--- a/docs/components/nav-tabs.tsx
+++ b/docs/components/nav-tabs.tsx
@@ -6,7 +6,7 @@ import { usePathname } from 'next/navigation';
const tabs = [
{ href: '/docs', label: 'Docs', exact: true },
{ href: '/docs/api', label: 'API' },
- { href: '/docs/examples', label: 'Examples' },
+ { href: '/cookbooks', label: 'Cookbooks' },
];
export function NavTabs() {
@@ -16,7 +16,7 @@ export function NavTabs() {
if (exact) {
// For "Docs", only active if exactly /docs or /docs/ but not /docs/api
return pathname === href || pathname === `${href}/` ||
- (pathname.startsWith('/docs') && !pathname.startsWith('/docs/api') && !pathname.startsWith('/docs/examples'));
+ (pathname.startsWith('/docs') && !pathname.startsWith('/docs/api') && !pathname.startsWith('/cookbooks'));
}
return pathname.startsWith(href);
};
diff --git a/docs/components/top-nav.tsx b/docs/components/top-nav.tsx
index 18b48b563..2267c8319 100644
--- a/docs/components/top-nav.tsx
+++ b/docs/components/top-nav.tsx
@@ -7,7 +7,7 @@ import { usePathname } from 'next/navigation';
const navItems = [
{ href: '/docs', label: 'Docs' },
{ href: '/docs/api', label: 'API' },
- { href: '/docs/examples', label: 'Examples' },
+ { href: '/cookbooks', label: 'Cookbooks' },
];
export function TopNav() {
@@ -18,7 +18,7 @@ export function TopNav() {
return pathname === '/docs' ||
(pathname.startsWith('/docs') &&
!pathname.startsWith('/docs/api') &&
- !pathname.startsWith('/docs/examples'));
+ !pathname.startsWith('/cookbooks'));
}
return pathname.startsWith(href);
};
diff --git a/docs/content/examples/fast-api.mdx b/docs/content/cookbooks/fast-api.mdx
similarity index 100%
rename from docs/content/examples/fast-api.mdx
rename to docs/content/cookbooks/fast-api.mdx
diff --git a/docs/content/examples/gmail-labeler.mdx b/docs/content/cookbooks/gmail-labeler.mdx
similarity index 100%
rename from docs/content/examples/gmail-labeler.mdx
rename to docs/content/cookbooks/gmail-labeler.mdx
diff --git a/docs/content/examples/hono.mdx b/docs/content/cookbooks/hono.mdx
similarity index 100%
rename from docs/content/examples/hono.mdx
rename to docs/content/cookbooks/hono.mdx
diff --git a/docs/content/cookbooks/index.mdx b/docs/content/cookbooks/index.mdx
new file mode 100644
index 000000000..8544365bd
--- /dev/null
+++ b/docs/content/cookbooks/index.mdx
@@ -0,0 +1,37 @@
+---
+title: Cookbooks
+description: Real-world examples and use cases for Composio
+---
+
+Browse open-source templates or follow step-by-step guides below.
+
+<Cards>
+ <Card title="Templates" href="/cookbooks/templates" description="Open-source starter projects with full source code. Clone and deploy." />
+</Cards>
+
+## Getting Started
+
+<Cards>
+ <Card title="Basic FastAPI Server" href="/cookbooks/fast-api" description="Build a Gmail agent with FastAPI" />
+ <Card title="Basic Hono Server" href="/cookbooks/hono" description="Build a Gmail agent with Hono.js" />
+</Cards>
+
+## Productivity & Automation
+
+<Cards>
+ <Card title="Gmail Labeler" href="/cookbooks/gmail-labeler" description="Automatically label incoming emails using triggers" />
+ <Card title="Slack Summarizer" href="/cookbooks/slack-summariser" description="Summarize Slack channel messages" />
+ <Card title="Supabase SQL Agent" href="/cookbooks/supabase-sql-agent" description="Execute SQL queries using natural language" />
+</Cards>
+
+## Full Stack Applications
+
+<Cards>
+ <Card title="Full Stack Chat App" href="/cookbooks/vercel-chat" description="Build a chat interface with user connections" />
+</Cards>
+
+## Behind the Curtain
+
+<Cards>
+ <Card title="Tool Type Generator" href="/cookbooks/tool-generator" description="Build platforms using raw tool definitions" />
+</Cards>
diff --git a/docs/content/examples/meta.json b/docs/content/cookbooks/meta.json
similarity index 93%
rename from docs/content/examples/meta.json
rename to docs/content/cookbooks/meta.json
index 125ebaa10..a90576904 100644
--- a/docs/content/examples/meta.json
+++ b/docs/content/cookbooks/meta.json
@@ -1,5 +1,5 @@
{
- "title": "Examples",
+ "title": "Cookbooks",
"root": true,
"pages": [
"---Getting Started---",
diff --git a/docs/content/examples/slack-summariser.mdx b/docs/content/cookbooks/slack-summariser.mdx
similarity index 100%
rename from docs/content/examples/slack-summariser.mdx
rename to docs/content/cookbooks/slack-summariser.mdx
diff --git a/docs/content/examples/supabase-sql-agent.mdx b/docs/content/cookbooks/supabase-sql-agent.mdx
similarity index 100%
rename from docs/content/examples/supabase-sql-agent.mdx
rename to docs/content/cookbooks/supabase-sql-agent.mdx
diff --git a/docs/content/examples/templates.mdx b/docs/content/cookbooks/templates.mdx
similarity index 100%
rename from docs/content/examples/templates.mdx
rename to docs/content/cookbooks/templates.mdx
diff --git a/docs/content/examples/tool-generator.mdx b/docs/content/cookbooks/tool-generator.mdx
similarity index 100%
rename from docs/content/examples/tool-generator.mdx
rename to docs/content/cookbooks/tool-generator.mdx
diff --git a/docs/content/examples/vercel-chat.mdx b/docs/content/cookbooks/vercel-chat.mdx
similarity index 100%
rename from docs/content/examples/vercel-chat.mdx
rename to docs/content/cookbooks/vercel-chat.mdx
diff --git a/docs/content/examples/index.mdx b/docs/content/examples/index.mdx
deleted file mode 100644
index ba43670d1..000000000
--- a/docs/content/examples/index.mdx
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: Examples
-description: Real-world examples and use cases for Composio
----
-
-Browse open-source templates or follow step-by-step guides below.
-
-<Cards>
- <Card title="Templates" href="/examples/templates" description="Open-source starter projects with full source code. Clone and deploy." />
-</Cards>
-
-## Getting Started
-
-<Cards>
- <Card title="Basic FastAPI Server" href="/examples/fast-api" description="Build a Gmail agent with FastAPI" />
- <Card title="Basic Hono Server" href="/examples/hono" description="Build a Gmail agent with Hono.js" />
-</Cards>
-
-## Productivity & Automation
-
-<Cards>
- <Card title="Gmail Labeler" href="/examples/gmail-labeler" description="Automatically label incoming emails using triggers" />
- <Card title="Slack Summarizer" href="/examples/slack-summariser" description="Summarize Slack channel messages" />
- <Card title="Supabase SQL Agent" href="/examples/supabase-sql-agent" description="Execute SQL queries using natural language" />
-</Cards>
-
-## Full Stack Applications
-
-<Cards>
- <Card title="Full Stack Chat App" href="/examples/vercel-chat" description="Build a chat interface with user connections" />
-</Cards>
-
-## Behind the Curtain
-
-<Cards>
- <Card title="Tool Type Generator" href="/examples/tool-generator" description="Build platforms using raw tool definitions" />
-</Cards>
diff --git a/docs/lib/layout.shared.tsx b/docs/lib/layout.shared.tsx
index 7b083d7e7..8f2b5a6e7 100644
--- a/docs/lib/layout.shared.tsx
+++ b/docs/lib/layout.shared.tsx
@@ -51,8 +51,8 @@ export function baseOptions(): BaseLayoutProps {
active: 'nested-url',
},
{
- text: 'Examples',
- url: '/examples',
+ text: 'Cookbooks',
+ url: '/cookbooks',
active: 'nested-url',
},
{
diff --git a/docs/lib/source.ts b/docs/lib/source.ts
index a0de4b977..6fdfeb580 100644
--- a/docs/lib/source.ts
+++ b/docs/lib/source.ts
@@ -1,4 +1,4 @@
-import { docs, reference, examples, toolkits, changelog } from 'fumadocs-mdx:collections/server';
+import { docs, reference, cookbooks, toolkits, changelog } from 'fumadocs-mdx:collections/server';
import { type InferPageType, loader, multiple } from 'fumadocs-core/source';
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
import { openapi } from './openapi';
@@ -68,9 +68,9 @@ export const referenceSource = loader({
plugins: [lucideIconsPlugin()],
});
-export const examplesSource = loader({
- baseUrl: '/examples',
- source: examples.toFumadocsSource(),
+export const cookbooksSource = loader({
+ baseUrl: '/cookbooks',
+ source: cookbooks.toFumadocsSource(),
plugins: [lucideIconsPlugin()],
});
@@ -350,7 +350,7 @@ ${page.data.description || ''}`;
const cleanContent = mdxToCleanMarkdown(content);
const footer = includeFooter
- ? `\n\n---\n\n📚 **More documentation:** [View all docs](https://docs.composio.dev/llms.txt) | [Examples](https://docs.composio.dev/llms.mdx/examples) | [API Reference](https://docs.composio.dev/llms.mdx/reference)`
+ ? `\n\n---\n\n📚 **More documentation:** [View all docs](https://docs.composio.dev/llms.txt) | [Cookbooks](https://docs.composio.dev/llms.mdx/cookbooks) | [API Reference](https://docs.composio.dev/llms.mdx/reference)`
: '';
return `# ${page.data.title} (${page.url})
diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index a1322d533..0af030b3e 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -32,6 +32,22 @@ const config = {
destination: '/docs',
permanent: false,
},
+ {
+ source: '/examples',
+ destination: '/cookbooks',
+ permanent: true,
+ },
+ // Specific /examples/ subroutes before the catch-all
+ {
+ source: '/examples/combined/:path*',
+ destination: '/cookbooks',
+ permanent: true,
+ },
+ {
+ source: '/examples/:path*',
+ destination: '/cookbooks/:path*',
+ permanent: true,
+ },
{
source: '/docs/welcome',
destination: '/docs',
@@ -342,7 +358,7 @@ const config = {
},
{
source: '/guides/examples/:path*',
- destination: '/examples',
+ destination: '/cookbooks',
permanent: true,
},
{
@@ -472,7 +488,7 @@ const config = {
// Guides case studies
{
source: '/guides/casestudy/:path*',
- destination: '/examples',
+ destination: '/cookbooks',
permanent: true,
},
// Docs pages that moved or don't exist
@@ -548,12 +564,7 @@ const config = {
destination: '/reference',
permanent: true,
},
- // Old Fern example URLs
- {
- source: '/examples/combined/:path*',
- destination: '/examples',
- permanent: true,
- },
+ // Old Fern example URLs (specific redirect moved above catch-all)
// Old /docs/frameworks/* paths (now /docs/providers/*)
// e.g. /docs/frameworks/claude-code → /docs/providers/anthropic
{
@@ -584,7 +595,7 @@ const config = {
},
{
source: '/apps/usecases/:path*',
- destination: '/examples',
+ destination: '/cookbooks',
permanent: true,
},
{
@@ -717,7 +728,7 @@ const config = {
},
{
source: '/cryptokit/:path*',
- destination: '/examples',
+ destination: '/cookbooks',
permanent: true,
},
{
diff --git a/docs/scripts/validate-links.ts b/docs/scripts/validate-links.ts
index 4967b77a7..900c3cbc5 100644
--- a/docs/scripts/validate-links.ts
+++ b/docs/scripts/validate-links.ts
@@ -8,14 +8,14 @@ import type { InferPageType } from 'fumadocs-core/source';
import {
source,
referenceSource,
- examplesSource,
+ cookbooksSource,
toolkitsSource,
} from '../lib/source';
type AnySource =
| typeof source
| typeof referenceSource
- | typeof examplesSource
+ | typeof cookbooksSource
| typeof toolkitsSource;
async function checkLinks() {
@@ -31,7 +31,7 @@ async function checkLinks() {
value: { slug: page.slugs },
hashes: getHeadings(page),
})),
- 'examples/[[...slug]]': examplesSource.getPages().map((page) => ({
+ 'cookbooks/[[...slug]]': cookbooksSource.getPages().map((page) => ({
value: { slug: page.slugs },
hashes: getHeadings(page),
})),
@@ -74,7 +74,7 @@ function getHeadings({ data }: InferPageType<AnySource>): string[] {
}
async function getFiles(): Promise<FileObject[]> {
- const sources = [source, referenceSource, examplesSource, toolkitsSource];
+ const sources = [source, referenceSource, cookbooksSource, toolkitsSource];
const allFiles: FileObject[] = [];
for (const src of sources) {
diff --git a/docs/source.config.ts b/docs/source.config.ts
index 709e0339c..46e5d106f 100644
--- a/docs/source.config.ts
+++ b/docs/source.config.ts
@@ -56,8 +56,8 @@ export const reference = defineDocs({
},
});
-export const examples = defineDocs({
- dir: 'content/examples',
+export const cookbooks = defineDocs({
+ dir: 'content/cookbooks',
docs: {
schema: docsSchema,
postprocess: {