@devries-cameron20 / composio Mirror · read-only / commits / 7b7515ca2
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, 13:15 UTC

fix(docs): Enable includeProcessedMarkdown for all sources

- Add includeProcessedMarkdown: true to reference, examples, and toolkits sources - This enables getText('processed') which works in Vercel's serverless environment - getText('raw') fails in serverless because raw MDX files aren't deployed - Add fallback error handling: try processed → raw → description Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

sohamganatra committed Jan 27, 2026 at 23:42 UTC 7b7515ca23902683ac9e7e200ce7a97c1bdb894f
2 files changed +30 -2
docs/lib/source.ts
+21 -2
@@ -176,7 +176,6 @@ function mdxToCleanMarkdown(content: string): string {
176 }
177
178 export async function getLLMText(page: InferPageType<typeof source>) {
179 - // Use 'processed' mode since that's what includeProcessedMarkdown enables
179 // Fall back to description if getText is not available
180 if (typeof page.data.getText !== 'function') {
181 return `# ${page.data.title} (${page.url})
@@ -184,7 +183,27 @@ export async function getLLMText(page: InferPageType<typeof source>) {
183 ${page.data.description || ''}`;
184 }
185
187 - const content = await page.data.getText('processed');
186 + // Try 'processed' mode first (works in serverless), then 'raw' (works locally)
187 + // Both can fail in different environments, so handle gracefully
188 + let content: string | null = null;
189 +
190 + try {
191 + content = await page.data.getText('processed');
192 + } catch (e) {
193 + console.error('getText(processed) failed:', e);
194 + try {
195 + content = await page.data.getText('raw');
196 + } catch (e2) {
197 + console.error('getText(raw) also failed:', e2);
198 + }
199 + }
200 +
201 + if (!content) {
202 + return `# ${page.data.title} (${page.url})
203 +
204 +${page.data.description || ''}`;
205 + }
206 +
207 const cleanContent = mdxToCleanMarkdown(content);
208
209 return `# ${page.data.title} (${page.url})
docs/source.config.ts
+9
@@ -37,6 +37,9 @@ export const reference = defineDocs({
37 dir: 'content/reference',
38 docs: {
39 schema: docsSchema,
40 + postprocess: {
41 + includeProcessedMarkdown: true,
42 + },
43 mdxOptions: applyMdxPreset({
44 rehypeCodeOptions: {
45 themes: {
@@ -56,6 +59,9 @@ export const examples = defineDocs({
59 dir: 'content/examples',
60 docs: {
61 schema: docsSchema,
62 + postprocess: {
63 + includeProcessedMarkdown: true,
64 + },
65 },
66 meta: {
67 schema: metaSchema,
@@ -66,6 +72,9 @@ export const toolkits = defineDocs({
72 dir: 'content/toolkits',
73 docs: {
74 schema: docsSchema,
75 + postprocess: {
76 + includeProcessedMarkdown: true,
77 + },
78 },
79 meta: {
80 schema: metaSchema,