Static-site framework for React
React pages.
Static output.
Nib turns React, Markdown, and data into complete static pages. Add browser JavaScript only where interaction needs it.
npx @briansunter/nib init my-siteStart with the file tree
The source is the map.
Initialize a site, then let folders describe its routes. Keep content, typed data, browser enhancements, and React islands in the places they belong.
my-site / srcproject map
my-site/
├── nib.config.ts
└── src/
├── pages/
│ ├── page.tsx
│ ├── about/page.md
│ ├── posts/page.csv
│ └── layout.tsx
├── content/posts/
├── enhancements/counter/index.client.ts
└── islands/counter.tsxabout/page.md → /about/counter/index.client.ts → browser JSOne site, four ways to author
Use the lightest tool for each page.
Routes follow the file tree. Pick TSX, Markdown, or data at build time, then add an enhancement or island when one element needs to run in the browser.
page.tsxReact pagesWrite custom page structure in TSX. Nib renders it to complete HTML.
HTML page.mdMarkdownPut content in Markdown and wrap it with a shared layout.
HTML page.csvData pagesTurn typed data into one route or an entire collection of pages.
many routes enhancements/ · islands/Client enhancementsEnhance existing DOM or hydrate a local React island.
opt-in JS From folder to host
No server required.
Build to dist/client, preview the result, and deploy it to any static host.