Note:
HeliumTS is under active development. Expect bugs and breaking changes. If you find any issues, please report them in our GitHub
A stable release is planned for early 2026.
Static Site Generation (SSG)
HeliumTS supports Static Site Generation by pre-rendering pages at build time. It is the right fit for pages that should ship real HTML but do not need request-time data.
Add a "use ssg"; directive at the top of your page component to enable SSG:
src/pages/about.tsx
1"use ssg";23import React from "react";45export default function AboutPage() {6 return (7 <div>8 <h1>About Us</h1>9 <p>This page is statically generated at build time.</p>10 </div>11 );12}
During build, Helium validates SSG pages, renders them ahead of time, and writes static HTML into the build output.
When to Use SSG
- Documentation, marketing pages, and other mostly static content.
- Pages where SEO matters but the content changes infrequently.
- Hybrid pages where the shell is static and dynamic data loads after hydration.
How It Works
- Helium scans
src/pagesfor files containing"use ssg";. - Each page is checked for SSG compatibility.
- The page is rendered at build time and written to the final output as HTML.
SSG vs SSR
Use SSG when the HTML can be generated once at build time. Use "use ssr"; when the markup depends on per-request data such as authenticated users, headers, or database lookups.