Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 09:30 UTC
docs: Rename Examples → Cookbooks across entire docs site
Renames the "Examples" section to "Cookbooks" - directory structure, routes, navigation, search, LLM endpoints, sitemap, and redirects. Adds /examples/* → /cookbooks/* permanent redirects for backwards compat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 16, 2026 at 02:10 UTC
b72046149541bfe0449c2bd55bbfd8f7e14a16e5
28 files changed
+107
-96
docs/app/(home)/cookbooks/[[...slug]]/page.tsx
new
+6
@@ -0,0 +1,6 @@
1
+import { cookbooksSource } from '@/lib/source';
2
+import { createDocsPage, createGenerateStaticParams, createGenerateMetadata } from '@/lib/create-docs-page';
3
+
4
+export default createDocsPage(cookbooksSource);
5
+export const generateStaticParams = createGenerateStaticParams(cookbooksSource);
6
+export const generateMetadata = createGenerateMetadata(cookbooksSource, 'cookbooks');
docs/app/(home)/cookbooks/layout.tsx
new
+4
@@ -0,0 +1,4 @@
1
+import { cookbooksSource } from '@/lib/source';
2
+import { createDocsLayout } from '@/lib/create-docs-layout';
3
+
4
+export default createDocsLayout(cookbooksSource);
docs/app/(home)/examples/[[...slug]]/page.tsx
deleted
-6
@@ -1,6 +0,0 @@
1
-import { examplesSource } from '@/lib/source';
2
-import { createDocsPage, createGenerateStaticParams, createGenerateMetadata } from '@/lib/create-docs-page';
3
-
4
-export default createDocsPage(examplesSource);
5
-export const generateStaticParams = createGenerateStaticParams(examplesSource);
6
-export const generateMetadata = createGenerateMetadata(examplesSource, 'examples');
docs/app/(home)/examples/layout.tsx
deleted
-4
@@ -1,4 +0,0 @@
1
-import { examplesSource } from '@/lib/source';
2
-import { createDocsLayout } from '@/lib/create-docs-layout';
3
-
4
-export default createDocsLayout(examplesSource);
docs/app/api/search/route.ts
+5
-5
@@ -1,5 +1,5 @@
1
// Use direct imports from collections to avoid top-level await in lib/source.ts
2
-import { docs, examples, toolkits } from 'fumadocs-mdx:collections/server';
2
+import { docs, cookbooks, toolkits } from 'fumadocs-mdx:collections/server';
3
import { createSearchAPI } from 'fumadocs-core/search/server';
4
import { loader } from 'fumadocs-core/source';
5
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
@@ -11,9 +11,9 @@ const docsSource = loader({
11
plugins: [lucideIconsPlugin()],
12
});
13
14
-const examplesSource = loader({
15
- baseUrl: '/examples',
16
- source: examples.toFumadocsSource(),
14
+const cookbooksSource = loader({
15
+ baseUrl: '/cookbooks',
16
+ source: cookbooks.toFumadocsSource(),
17
plugins: [lucideIconsPlugin()],
18
});
19
@@ -25,7 +25,7 @@ const toolkitsSource = loader({
25
26
const allPages = [
27
...docsSource.getPages(),
28
- ...examplesSource.getPages(),
28
+ ...cookbooksSource.getPages(),
29
...toolkitsSource.getPages(),
30
];
31
docs/app/llms-full.txt/route.ts
+5
-5
@@ -1,4 +1,4 @@
1
-import { getLLMText, source, examplesSource, referenceSource, toolkitsSource } from '@/lib/source';
1
+import { getLLMText, source, cookbooksSource, referenceSource, toolkitsSource } from '@/lib/source';
2
import type { ReactNode } from 'react';
3
4
export const revalidate = false;
@@ -98,9 +98,9 @@ export async function GET() {
98
source.pageTree.children as TreeNode[]
99
);
100
101
- const [docsResults, examplesResults, referenceResults, toolkitsResults] = await Promise.all([
101
+ const [docsResults, cookbooksResults, referenceResults, toolkitsResults] = await Promise.all([
102
getTextForPages(orderedDocsPages),
103
- getTextForPages(examplesSource.getPages() as PageLike[]),
103
+ getTextForPages(cookbooksSource.getPages() as PageLike[]),
104
getTextForPages(referenceSource.getPages() as PageLike[]),
105
getTextForPages(toolkitsSource.getPages() as PageLike[]),
106
]);
@@ -108,8 +108,8 @@ export async function GET() {
108
const results = [
109
'# 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',
110
...docsResults,
111
- '\n# Examples\n',
112
- ...examplesResults,
111
+ '\n# Cookbooks\n',
112
+ ...cookbooksResults,
113
'\n# API Reference\n',
114
...referenceResults,
115
'\n# Toolkits\n',
docs/app/llms.mdx/[[...slug]]/route.ts
+2
-2
@@ -1,7 +1,7 @@
1
import {
2
source,
3
getReferenceSource,
4
- examplesSource,
4
+ cookbooksSource,
5
toolkitsSource,
6
changelogEntries,
7
slugToDate,
@@ -481,7 +481,7 @@ async function openapiPageToMarkdown(
481
// Note: 'reference' is handled specially below with async getReferenceSource()
482
const sources = [
483
{ prefix: 'docs', source },
484
- { prefix: 'examples', source: examplesSource },
484
+ { prefix: 'cookbooks', source: cookbooksSource },
485
{ prefix: 'toolkits', source: toolkitsSource },
486
];
487
docs/app/llms.txt/route.ts
+4
-4
@@ -1,4 +1,4 @@
1
-import { source, examplesSource, referenceSource, toolkitsSource } from '@/lib/source';
1
+import { source, cookbooksSource, referenceSource, toolkitsSource } from '@/lib/source';
2
import type { ReactNode } from 'react';
3
4
export const revalidate = false;
@@ -83,7 +83,7 @@ export async function GET() {
83
try {
84
const docsTree = walkPageTree(source.pageTree.children as TreeNode[]);
85
86
- const examplesPages = examplesSource.getPages();
86
+ const cookbooksPages = cookbooksSource.getPages();
87
const referencePages = referenceSource.getPages();
88
const toolkitsPages = toolkitsSource.getPages();
89
@@ -93,9 +93,9 @@ export async function GET() {
93
94
${docsTree}
95
96
-## Examples
96
+## Cookbooks
97
98
-${examplesPages.map(formatPage).join('\n')}
98
+${cookbooksPages.map(formatPage).join('\n')}
99
100
## API Reference
101
docs/app/not-found.tsx
+2
-2
@@ -85,8 +85,8 @@ export default async function NotFound() {
85
<Link href="/toolkits" className="hover:text-fd-foreground transition-colors">
86
Toolkits
87
</Link>
88
- <Link href="/examples" className="hover:text-fd-foreground transition-colors">
89
- Examples
88
+ <Link href="/cookbooks" className="hover:text-fd-foreground transition-colors">
89
+ Cookbooks
90
</Link>
91
<Link href="/reference" className="hover:text-fd-foreground transition-colors">
92
API Reference
docs/app/sitemap.ts
+3
-3
@@ -2,7 +2,7 @@ import type { MetadataRoute } from 'next';
2
import {
3
source,
4
getReferenceSource,
5
- examplesSource,
5
+ cookbooksSource,
6
toolkitsSource,
7
changelogEntries,
8
dateToChangelogUrl,
@@ -22,7 +22,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
22
url: `${baseUrl}${page.url}`,
23
}));
24
25
- const examplesPages = examplesSource.getPages().map((page) => ({
25
+ const cookbooksPages = cookbooksSource.getPages().map((page) => ({
26
url: `${baseUrl}${page.url}`,
27
}));
28
@@ -47,7 +47,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
47
{ url: `${baseUrl}/docs/changelog` },
48
...docsPages,
49
...referencePages,
50
- ...examplesPages,
50
+ ...cookbooksPages,
51
...toolkitsMdxPages,
52
...toolkitsJsonPages,
53
...changelogPages,
docs/components/nav-tabs.tsx
+2
-2
@@ -6,7 +6,7 @@ import { usePathname } from 'next/navigation';
6
const tabs = [
7
{ href: '/docs', label: 'Docs', exact: true },
8
{ href: '/docs/api', label: 'API' },
9
- { href: '/docs/examples', label: 'Examples' },
9
+ { href: '/cookbooks', label: 'Cookbooks' },
10
];
11
12
export function NavTabs() {
@@ -16,7 +16,7 @@ export function NavTabs() {
16
if (exact) {
17
// For "Docs", only active if exactly /docs or /docs/ but not /docs/api
18
return pathname === href || pathname === `${href}/` ||
19
- (pathname.startsWith('/docs') && !pathname.startsWith('/docs/api') && !pathname.startsWith('/docs/examples'));
19
+ (pathname.startsWith('/docs') && !pathname.startsWith('/docs/api') && !pathname.startsWith('/cookbooks'));
20
}
21
return pathname.startsWith(href);
22
};
docs/components/top-nav.tsx
+2
-2
@@ -7,7 +7,7 @@ import { usePathname } from 'next/navigation';
7
const navItems = [
8
{ href: '/docs', label: 'Docs' },
9
{ href: '/docs/api', label: 'API' },
10
- { href: '/docs/examples', label: 'Examples' },
10
+ { href: '/cookbooks', label: 'Cookbooks' },
11
];
12
13
export function TopNav() {
@@ -18,7 +18,7 @@ export function TopNav() {
18
return pathname === '/docs' ||
19
(pathname.startsWith('/docs') &&
20
!pathname.startsWith('/docs/api') &&
21
- !pathname.startsWith('/docs/examples'));
21
+ !pathname.startsWith('/cookbooks'));
22
}
23
return pathname.startsWith(href);
24
};
docs/content/cookbooks/fast-api.mdx
renamed
docs/content/cookbooks/gmail-labeler.mdx
renamed
docs/content/cookbooks/hono.mdx
renamed
docs/content/cookbooks/index.mdx
new
+37
@@ -0,0 +1,37 @@
1
+---
2
+title: Cookbooks
3
+description: Real-world examples and use cases for Composio
4
+---
5
+
6
+Browse open-source templates or follow step-by-step guides below.
7
+
8
+<Cards>
9
+ <Card title="Templates" href="/cookbooks/templates" description="Open-source starter projects with full source code. Clone and deploy." />
10
+</Cards>
11
+
12
+## Getting Started
13
+
14
+<Cards>
15
+ <Card title="Basic FastAPI Server" href="/cookbooks/fast-api" description="Build a Gmail agent with FastAPI" />
16
+ <Card title="Basic Hono Server" href="/cookbooks/hono" description="Build a Gmail agent with Hono.js" />
17
+</Cards>
18
+
19
+## Productivity & Automation
20
+
21
+<Cards>
22
+ <Card title="Gmail Labeler" href="/cookbooks/gmail-labeler" description="Automatically label incoming emails using triggers" />
23
+ <Card title="Slack Summarizer" href="/cookbooks/slack-summariser" description="Summarize Slack channel messages" />
24
+ <Card title="Supabase SQL Agent" href="/cookbooks/supabase-sql-agent" description="Execute SQL queries using natural language" />
25
+</Cards>
26
+
27
+## Full Stack Applications
28
+
29
+<Cards>
30
+ <Card title="Full Stack Chat App" href="/cookbooks/vercel-chat" description="Build a chat interface with user connections" />
31
+</Cards>
32
+
33
+## Behind the Curtain
34
+
35
+<Cards>
36
+ <Card title="Tool Type Generator" href="/cookbooks/tool-generator" description="Build platforms using raw tool definitions" />
37
+</Cards>
docs/content/cookbooks/meta.json
renamed
+1
-1
@@ -1,5 +1,5 @@
1
{
2
- "title": "Examples",
2
+ "title": "Cookbooks",
3
"root": true,
4
"pages": [
5
"---Getting Started---",
docs/content/cookbooks/slack-summariser.mdx
renamed
docs/content/cookbooks/supabase-sql-agent.mdx
renamed
docs/content/cookbooks/templates.mdx
renamed
docs/content/cookbooks/tool-generator.mdx
renamed
docs/content/cookbooks/vercel-chat.mdx
renamed
docs/content/examples/index.mdx
deleted
-37
@@ -1,37 +0,0 @@
1
----
2
-title: Examples
3
-description: Real-world examples and use cases for Composio
4
----
5
-
6
-Browse open-source templates or follow step-by-step guides below.
7
-
8
-<Cards>
9
- <Card title="Templates" href="/examples/templates" description="Open-source starter projects with full source code. Clone and deploy." />
10
-</Cards>
11
-
12
-## Getting Started
13
-
14
-<Cards>
15
- <Card title="Basic FastAPI Server" href="/examples/fast-api" description="Build a Gmail agent with FastAPI" />
16
- <Card title="Basic Hono Server" href="/examples/hono" description="Build a Gmail agent with Hono.js" />
17
-</Cards>
18
-
19
-## Productivity & Automation
20
-
21
-<Cards>
22
- <Card title="Gmail Labeler" href="/examples/gmail-labeler" description="Automatically label incoming emails using triggers" />
23
- <Card title="Slack Summarizer" href="/examples/slack-summariser" description="Summarize Slack channel messages" />
24
- <Card title="Supabase SQL Agent" href="/examples/supabase-sql-agent" description="Execute SQL queries using natural language" />
25
-</Cards>
26
-
27
-## Full Stack Applications
28
-
29
-<Cards>
30
- <Card title="Full Stack Chat App" href="/examples/vercel-chat" description="Build a chat interface with user connections" />
31
-</Cards>
32
-
33
-## Behind the Curtain
34
-
35
-<Cards>
36
- <Card title="Tool Type Generator" href="/examples/tool-generator" description="Build platforms using raw tool definitions" />
37
-</Cards>
docs/lib/layout.shared.tsx
+2
-2
@@ -51,8 +51,8 @@ export function baseOptions(): BaseLayoutProps {
51
active: 'nested-url',
52
},
53
{
54
- text: 'Examples',
55
- url: '/examples',
54
+ text: 'Cookbooks',
55
+ url: '/cookbooks',
56
active: 'nested-url',
57
},
58
{
docs/lib/source.ts
+5
-5
@@ -1,4 +1,4 @@
1
-import { docs, reference, examples, toolkits, changelog } from 'fumadocs-mdx:collections/server';
1
+import { docs, reference, cookbooks, toolkits, changelog } from 'fumadocs-mdx:collections/server';
2
import { type InferPageType, loader, multiple } from 'fumadocs-core/source';
3
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
4
import { openapi } from './openapi';
@@ -68,9 +68,9 @@ export const referenceSource = loader({
68
plugins: [lucideIconsPlugin()],
69
});
70
71
-export const examplesSource = loader({
72
- baseUrl: '/examples',
73
- source: examples.toFumadocsSource(),
71
+export const cookbooksSource = loader({
72
+ baseUrl: '/cookbooks',
73
+ source: cookbooks.toFumadocsSource(),
74
plugins: [lucideIconsPlugin()],
75
});
76
@@ -350,7 +350,7 @@ ${page.data.description || ''}`;
350
const cleanContent = mdxToCleanMarkdown(content);
351
352
const footer = includeFooter
353
- ? `\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)`
353
+ ? `\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)`
354
: '';
355
356
return `# ${page.data.title} (${page.url})
docs/next.config.mjs
+21
-10
@@ -32,6 +32,22 @@ const config = {
32
destination: '/docs',
33
permanent: false,
34
},
35
+ {
36
+ source: '/examples',
37
+ destination: '/cookbooks',
38
+ permanent: true,
39
+ },
40
+ // Specific /examples/ subroutes before the catch-all
41
+ {
42
+ source: '/examples/combined/:path*',
43
+ destination: '/cookbooks',
44
+ permanent: true,
45
+ },
46
+ {
47
+ source: '/examples/:path*',
48
+ destination: '/cookbooks/:path*',
49
+ permanent: true,
50
+ },
51
{
52
source: '/docs/welcome',
53
destination: '/docs',
@@ -342,7 +358,7 @@ const config = {
358
},
359
{
360
source: '/guides/examples/:path*',
345
- destination: '/examples',
361
+ destination: '/cookbooks',
362
permanent: true,
363
},
364
{
@@ -472,7 +488,7 @@ const config = {
488
// Guides case studies
489
{
490
source: '/guides/casestudy/:path*',
475
- destination: '/examples',
491
+ destination: '/cookbooks',
492
permanent: true,
493
},
494
// Docs pages that moved or don't exist
@@ -548,12 +564,7 @@ const config = {
564
destination: '/reference',
565
permanent: true,
566
},
551
- // Old Fern example URLs
552
- {
553
- source: '/examples/combined/:path*',
554
- destination: '/examples',
555
- permanent: true,
556
- },
567
+ // Old Fern example URLs (specific redirect moved above catch-all)
568
// Old /docs/frameworks/* paths (now /docs/providers/*)
569
// e.g. /docs/frameworks/claude-code → /docs/providers/anthropic
570
{
@@ -584,7 +595,7 @@ const config = {
595
},
596
{
597
source: '/apps/usecases/:path*',
587
- destination: '/examples',
598
+ destination: '/cookbooks',
599
permanent: true,
600
},
601
{
@@ -717,7 +728,7 @@ const config = {
728
},
729
{
730
source: '/cryptokit/:path*',
720
- destination: '/examples',
731
+ destination: '/cookbooks',
732
permanent: true,
733
},
734
{
docs/scripts/validate-links.ts
+4
-4
@@ -8,14 +8,14 @@ import type { InferPageType } from 'fumadocs-core/source';
8
import {
9
source,
10
referenceSource,
11
- examplesSource,
11
+ cookbooksSource,
12
toolkitsSource,
13
} from '../lib/source';
14
15
type AnySource =
16
| typeof source
17
| typeof referenceSource
18
- | typeof examplesSource
18
+ | typeof cookbooksSource
19
| typeof toolkitsSource;
20
21
async function checkLinks() {
@@ -31,7 +31,7 @@ async function checkLinks() {
31
value: { slug: page.slugs },
32
hashes: getHeadings(page),
33
})),
34
- 'examples/[[...slug]]': examplesSource.getPages().map((page) => ({
34
+ 'cookbooks/[[...slug]]': cookbooksSource.getPages().map((page) => ({
35
value: { slug: page.slugs },
36
hashes: getHeadings(page),
37
})),
@@ -74,7 +74,7 @@ function getHeadings({ data }: InferPageType<AnySource>): string[] {
74
}
75
76
async function getFiles(): Promise<FileObject[]> {
77
- const sources = [source, referenceSource, examplesSource, toolkitsSource];
77
+ const sources = [source, referenceSource, cookbooksSource, toolkitsSource];
78
const allFiles: FileObject[] = [];
79
80
for (const src of sources) {
docs/source.config.ts
+2
-2
@@ -56,8 +56,8 @@ export const reference = defineDocs({
56
},
57
});
58
59
-export const examples = defineDocs({
60
- dir: 'content/examples',
59
+export const cookbooks = defineDocs({
60
+ dir: 'content/cookbooks',
61
docs: {
62
schema: docsSchema,
63
postprocess: {