@devries-cameron20 / composio-1 / commits / af2d498d3
Fork 0

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

feat(docs): Add sitemap.xml generation

Includes all docs, reference, examples, and toolkits pages. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Sushmithamallesh committed Jan 27, 2026 at 21:40 UTC af2d498d3366e092d4b72d43095ca580f9350ab4
1 file changed +34
docs/app/sitemap.ts new
+34
@@ -0,0 +1,34 @@
1 +import type { MetadataRoute } from 'next';
2 +import { source, referenceSource, examplesSource, toolkitsSource } from '@/lib/source';
3 +
4 +const baseUrl = 'https://docs.composio.dev';
5 +
6 +export default function sitemap(): MetadataRoute.Sitemap {
7 + const docsPages = source.getPages().map((page) => ({
8 + url: `${baseUrl}${page.url}`,
9 + lastModified: page.data.lastModified ?? new Date(),
10 + }));
11 +
12 + const referencePages = referenceSource.getPages().map((page) => ({
13 + url: `${baseUrl}${page.url}`,
14 + lastModified: page.data.lastModified ?? new Date(),
15 + }));
16 +
17 + const examplesPages = examplesSource.getPages().map((page) => ({
18 + url: `${baseUrl}${page.url}`,
19 + lastModified: page.data.lastModified ?? new Date(),
20 + }));
21 +
22 + const toolkitsPages = toolkitsSource.getPages().map((page) => ({
23 + url: `${baseUrl}${page.url}`,
24 + lastModified: page.data.lastModified ?? new Date(),
25 + }));
26 +
27 + return [
28 + { url: baseUrl, lastModified: new Date() },
29 + ...docsPages,
30 + ...referencePages,
31 + ...examplesPages,
32 + ...toolkitsPages,
33 + ];
34 +}