docs_build_static
Build static documentation websites for deployment to platforms like GitHub Pages, Netlify, and Vercel. Converts documentation directories into production-ready static sites using frameworks including Docusaurus, MkDocs, and Sphinx.
Instructions
Build static website for online hosting (ready for GitHub Pages, Netlify, Vercel, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docsPath | Yes | Path to documentation directory | |
| framework | Yes | Documentation framework used | |
| outputPath | No | Output path for built site (default: ./build) |
Implementation Reference
- src/tools/buildStatic.ts:7-72 (handler)The main execution handler for the 'docs_build_static' tool. It destructures the arguments and returns framework-specific (Docusaurus, MkDocs, Sphinx) build instructions as a text response.export async function buildStatic(args: any) { const { docsPath, framework, outputPath } = args as BuildStaticArgs; const instructions: Record<string, string> = { docusaurus: `🏗️ Building Docusaurus Static Site: 1. Navigate to docs directory: cd ${docsPath} 2. Install dependencies (if not done): npm install 3. Build: npm run build 4. Output location: ${docsPath}/build 5. Test the build locally: npm run serve 6. Deploy to: - GitHub Pages: npm run deploy - Netlify: Drag & drop the 'build' folder - Vercel: Connect your repo`, mkdocs: `🏗️ Building MkDocs Static Site: 1. Navigate to project directory: cd ${docsPath} 2. Build: mkdocs build 3. Output location: ${docsPath}/site 4. Preview: cd site && python -m http.server 8000 5. Deploy to GitHub Pages: mkdocs gh-deploy`, sphinx: `🏗️ Building Sphinx Static Site: 1. Navigate to docs directory: cd ${docsPath} 2. Build HTML: make html 3. Output location: ${docsPath}/_build/html 4. Preview: cd _build/html && python -m http.server 8000 5. For ReadTheDocs: Connect your repository at readthedocs.org`, }; const instruction = instructions[framework] || "Framework not supported"; return { content: [ { type: "text", text: instruction, }, ], }; }
- src/index.ts:136-154 (schema)Input schema definition for the 'docs_build_static' tool, specifying required docsPath and framework, with optional outputPath.inputSchema: { type: "object", properties: { docsPath: { type: "string", description: "Path to documentation directory", }, framework: { type: "string", description: "Documentation framework used", enum: ["docusaurus", "mkdocs", "sphinx"], }, outputPath: { type: "string", description: "Output path for built site (default: ./build)", }, }, required: ["docsPath", "framework"], },
- src/index.ts:133-155 (registration)Registration of the 'docs_build_static' tool in the tools array, including name, description, and schema.{ name: "docs_build_static", description: "Build static website for online hosting (ready for GitHub Pages, Netlify, Vercel, etc.)", inputSchema: { type: "object", properties: { docsPath: { type: "string", description: "Path to documentation directory", }, framework: { type: "string", description: "Documentation framework used", enum: ["docusaurus", "mkdocs", "sphinx"], }, outputPath: { type: "string", description: "Output path for built site (default: ./build)", }, }, required: ["docsPath", "framework"], }, },
- src/index.ts:308-309 (registration)Dispatch registration in the switch statement for CallToolRequestSchema handler, calling the buildStatic function.case "docs_build_static": return await buildStatic(args);
- src/tools/buildStatic.ts:1-5 (schema)TypeScript interface matching the input schema for type safety in the handler function.interface BuildStaticArgs { docsPath: string; framework: string; outputPath?: string; }