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, and browser behavior 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/
└── islands/counter.tsxabout/page.md → /about/counter.tsx → 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 island when a small part 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 islands/*.tsxReact islandsAdd state and events to one subtree without hydrating the whole page.
opt-in JS From folder to host
No server required.
Build to dist/client, preview the result, and deploy it to any static host.