Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix: link checker was silently broken due to missing route group prefix
Sushmithamalleshe9ac4a5ea9c6
diff --git a/docs/scripts/validate-links.ts b/docs/scripts/validate-links.tsindex 900c3cbc5..466b5ecba 100644--- a/docs/scripts/validate-links.ts+++ b/docs/scripts/validate-links.ts@@ -1,3 +1,5 @@+import { readdir, readFile } from 'node:fs/promises';+import { join } from 'node:path';import {type FileObject,printErrors,@@ -22,20 +24,20 @@ async function checkLinks() {const scanned = await scanURLs({preset: 'next',populate: {- // Dynamic routes- 'docs/[[...slug]]': source.getPages().map((page) => ({+ // Dynamic routes (keys must include (home) route group to match app directory structure)+ '(home)/docs/[[...slug]]': source.getPages().map((page) => ({value: { slug: page.slugs },hashes: getHeadings(page),})),- 'reference/[[...slug]]': referenceSource.getPages().map((page) => ({+ '(home)/reference/[[...slug]]': referenceSource.getPages().map((page) => ({value: { slug: page.slugs },hashes: getHeadings(page),})),- 'cookbooks/[[...slug]]': cookbooksSource.getPages().map((page) => ({+ '(home)/cookbooks/[[...slug]]': cookbooksSource.getPages().map((page) => ({value: { slug: page.slugs },hashes: getHeadings(page),})),- 'toolkits/[[...slug]]': toolkitsSource.getPages().map((page) => ({+ '(home)/toolkits/[[...slug]]': toolkitsSource.getPages().map((page) => ({value: { slug: page.slugs },hashes: getHeadings(page),})),@@ -94,6 +96,25 @@ async function getFiles(): Promise<FileObject[]> {}}+ // Toolkit FAQ files (embedded snippets not in any Fumadocs source)+ const faqDir = join(process.cwd(), 'content/toolkit-faq');+ try {+ const faqFiles = await readdir(faqDir);+ for (const file of faqFiles) {+ if (!file.endsWith('.md')) continue;+ const filePath = join(faqDir, file);+ const content = await readFile(filePath, 'utf-8');+ const slug = file.replace(/\.md$/, '');+ allFiles.push({+ path: filePath,+ content,+ url: `/toolkits/${slug}`,+ });+ }+ } catch {+ // toolkit-faq directory doesn't exist, skip+ }+return allFiles;}