Getting Started with @pagesmith/docs
Install the docs package:
npm install @pagesmith/docsInitialize a new docs site:
npx pagesmith-docs initThis creates a pagesmith.config.json5 with smart defaults detected from your git repository, including basePath and origin for GitHub Pages deployment.
If you already follow the default conventions, the config file is optional: pagesmith-docs dev, build, preview, and mcp --stdio can run directly from a repo-root docs/ folder and emit to gh-pages/.
Running Locally
npx pagesmith-docs devThe dev server starts with hot reload. Content changes rebuild instantly without rebundling CSS or JavaScript.
Building for Production
npx pagesmith-docs buildOutputs static HTML to outDir in pagesmith.config.json5 (default: gh-pages/ when you omit the field, or even the entire config file in zero-config mode). When search.enabled is true, the build runs Pagefind indexing against that HTML output.
Preview the last build
npx pagesmith-docs previewServes the generated static files locally so you can validate hosting paths, basePath, and search without guessing from dev mode alone.
MCP server (agents & editors)
npx pagesmith-docs mcp --stdioRuns the docs MCP server on stdio for tools that speak the Model Context Protocol (for example editor integrations that need project-aware docs commands).