Nib documentation
Nib turns React, Markdown, and typed data into complete static pages. Start with a route, add browser JavaScript only where interaction needs it, then deploy dist/client to any static host.
Choose a guide
- Getting started — scaffold a site and publish your first route.
- Pages and routes — turn folders into URLs and page metadata.
- Markdown and layouts — write content inside reusable TSX layouts.
- Data pages and collections — validate data, generate routes, and build indexes.
- Image optimization — generate responsive local images at build time.
- Plugin content and routing — add formats, feeds, redirects, and virtual routes.
- Client enhancements — enhance existing DOM or hydrate one React island.
- GitHub Pages — deploy the static output with the correct base path.
Pick the lightest building block
| 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 |
| Client enhancement | Scoped events and DOM state | Only on marked routes |
| React island | Local React state, effects, and hooks | Only on island routes |
Build loop
- Configure framework options in
nib.config.ts. - Add
src/pages/<route>/page.tsx,page.md, or a configured data source. - Add
src/enhancements/<id>/index.client.tsfor scoped DOM work orsrc/islands/<id>.tsxfor local React state. - Run the project’s typecheck and
nib build. - Preview or deploy
dist/client.
Know the boundary
Nib does not provide runtime routes, runtime data loaders, server actions, whole-page hydration, or inline JSX in Markdown. Content and links remain ordinary static HTML.
Maintaining Nib? Read Releases, the architecture reference, or the client enhancement design record.