Detailed installation and deployment guide for Runir.
This guide covers installation, building for production, and deployment options.
| Requirement | Minimum |
|---|---|
| Node.js | 18.0+ |
| npm | 9.0+ |
npm install -g @fezcode/runir
Or use npx to run without installing:
npx @fezcode/runir init
runir init
This creates runir.config.js and a docs/ directory with starter templates.
runir dev
Your docs site is now running at http://localhost:3000.
Generate a fully static site:
runir build
This does two things:
out/ directoryAlways use runir build, not next build directly. The search index must be generated before the site build.
The out/ directory is a fully static site. Deploy it anywhere:
basePath in runir.config.js to your repo name (e.g., "/my-repo").github/workflows/deploy-docs.yml template)If your site deploys but the page is unstyled or blank, and the browser console shows 404 errors for _next/static/ files, your basePath is wrong.
basePath must match the URL root where your hosting platform serves the out/ directory. For GitHub Pages, that's always "/your-repo-name" — nothing more, nothing less.
// Wrong — assets will 404
basePath: "/my-repo/docs"
// Correct — matches where GitHub Pages serves the files
basePath: "/my-repo"
The basePath tells Next.js where to find all assets (JS bundles, CSS, images). If it doesn't match the actual server path, every asset request will fail.
A quick way to verify: after running runir build, check the generated HTML. The <script> tags should have src paths that match your hosting URL. If your site is at example.com/my-repo/, the paths should start with /my-repo/_next/....