@devries-cameron20 / composio Mirror · read-only / commits / 68f7fc56a
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 08:15 UTC

fix: add reference docs and changelog to search index

- Reference MDX pages (SDK reference, errors, rate-limits) now searchable - Changelog entries now searchable by title - Note: OpenAPI-generated API reference pages require async loading and can't be indexed in the sync search route Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmithamallesh committed Feb 18, 2026 at 17:56 UTC 68f7fc56ae3c33eb7410d4167692097bcd898a08
1 file changed +21 -2
docs/app/api/search/route.ts
+21 -2
@@ -1,5 +1,5 @@
1 // Use direct imports from collections to avoid top-level await in lib/source.ts
2 -import { docs, cookbooks, toolkits } from 'fumadocs-mdx:collections/server';
2 +import { docs, reference, cookbooks, toolkits, changelog } 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';
@@ -24,11 +24,20 @@ const toolkitsSource = loader({
24 plugins: [lucideIconsPlugin()],
25 });
26
27 +// Sync reference source (MDX pages only — SDK reference, errors, rate-limits, etc.)
28 +// OpenAPI-generated API reference pages require async loading and can't be indexed here
29 +const referenceSource = loader({
30 + baseUrl: '/reference',
31 + source: reference.toFumadocsSource(),
32 + plugins: [lucideIconsPlugin()],
33 +});
34 +
35 // MDX pages from Fumadocs sources
36 const mdxIndexes = [
37 ...docsSource.getPages(),
38 ...cookbooksSource.getPages(),
39 ...toolkitsSource.getPages(),
40 + ...referenceSource.getPages(),
41 ].map((page) => ({
42 id: page.url,
43 title: page.data.title ?? 'Untitled',
@@ -54,6 +63,16 @@ const dynamicToolkitIndexes = getAllToolkitsSync()
63 keywords: [toolkit.slug, toolkit.category].filter(Boolean) as string[],
64 }));
65
66 +// Changelog entries
67 +const changelogIndexes = changelog.map((entry) => ({
68 + id: `/docs/changelog/${entry.date.replace(/-/g, '/')}`,
69 + title: entry.title,
70 + description: entry.description ?? '',
71 + url: `/docs/changelog/${entry.date.replace(/-/g, '/')}`,
72 + structuredData: { headings: [], contents: [] },
73 + keywords: ['changelog'],
74 +}));
75 +
76 export const { GET } = createSearchAPI('advanced', {
58 - indexes: [...mdxIndexes, ...dynamicToolkitIndexes],
77 + indexes: [...mdxIndexes, ...dynamicToolkitIndexes, ...changelogIndexes],
78 });