Why Static Site Generation
2026-06-08
Static site generation (SSG) means every route is rendered to plain HTML ahead of time, during the build, instead of on every request.
The tradeoffs
- Speed — pages are served as static files, so there's no server-side rendering cost per request.
- Simplicity — hosting is just static file hosting, no runtime needed.
- Freshness — content only updates when you rebuild and redeploy.
For a blog, where content changes far less often than it's read, this is a
great fit. vite-react-ssg walks the route tree defined in
src/routes.tsx, renders each route with React's server renderer, and
writes the result to disk alongside the client bundle for hydration.