Nib documentation
Nib is a self-contained static-site framework for React, Markdown, data pages, and opt-in islands. Scaffold a project, put a page file in a route folder, add a React island only when a subtree needs browser interaction, and deploy the prerendered output.
Learn Nib
- Getting started — scaffold a Nib site and add a first route.
- Pages and routes — map page files to URLs and metadata.
- Markdown and layouts — write content and wrap it with TSX.
- Data pages and collections — render custom formats and build typed indexes.
- React islands — add typed browser interaction without hydrating the page shell.
- Image optimization — add static responsive local images with the optional plugin.
- Plugin content and routing — add formats, virtual routes, redirects, sitemap XML, and route inspection.
- GitHub Pages — deploy the static output with the correct base path.
Maintainers can use Releases for versioning and npm publishing. The repository architecture document explains the complete rendering pipeline, and the island design record captures the rationale. A separate HTML pages proposal records a possible future markup-first route format; it is not implemented in the current release.
Three building blocks
| Building block | Use it for | Browser JavaScript |
|---|---|---|
| TSX page | Typed, custom static markup | None by default |
| Markdown page | Articles, guides, and documentation | None by default |
| Data page | YAML, CSV, or another configured format | None by default |
| React island | State, effects, refs, and event handlers | Only for that island |
The everyday workflow
- Edit
nib.config.tsfor the site name, shell, base path, and navigation. - Add
src/pages/<route>/page.tsx,page.md, or a configured data page. - Add
src/islands/<id>.tsxonly when part of the route needs browser behavior. - Run
bun run devand open the new URL. - Run your project’s typecheck and
nib build. - Preview or deploy
dist/client.
Nib deliberately omits dynamic route parameters, client-side routing, runtime data loaders, server actions, independently hydrated nested roots, and inline JSX in Markdown.