When most page content is known before anyone requests it, generate the HTML before deployment. Static site generation (SSG) combines templates with content sources in a build step and ships the resulting HTML, CSS, JavaScript, images, and metadata as ordinary files. A static server serves those files; it does not assemble each page on request. The browser can then use JavaScript to enhance only the parts that need interaction. section 2.1.4 section 14.5
Table 2.2 Rendering models cheat sheet
| Rendering model | What you code | What you build and ship | What the server does on request | What the client does |
Static Site |
You code raw HTML, CSS, and JS files directly. |
None – you ship the files as-is. |
The server serves static files (no logic). |
The browser renders HTML, applies CSS, and executes minimal JS. |
SSG |
You code templates + content sources (Markdown, DB, CMS). |
A build step generates static HTML/JS/CSS files. |
The server only serves the pre-generated files, similar to a Static Site. |
The browser renders static pages, with optional JS for interactivity. |
SSR |
You code templates + server logic (PHP, Node, Python, etc.). |
Optional pre-compilation of templates or code. Ship source code or compiled binaries. |
On each request, the server queries the DB, merges data with templates, and outputs HTML. |
The browser receives ready HTML and CSS, plus optional JS that enhances interactivity. |
CSR |
You code mostly JS + an HTML shell + API endpoints. |
Optional tooling. Ship source code. |
The server serves static files, similar to a Static Site, and also provides JSON endpoints. |
The browser runs JS, manages the DOM, and fetches data via APIs. |
Universal |
You code with a framework whose code runs both client- and server-side (typically JS). |
A build step produces server and client bundles. Ship both to a Node-capable host. |
On each request, the server renders the initial HTML for the route. |
The browser displays the server-rendered HTML, then hydrates it to take over interactivity. |
ISR |
You code templates + content sources with a framework that supports revalidation. |
A build step pre-generates pages; you configure revalidation rules. Ship to a platform with a cache and runtime. |
The server serves cached static HTML and regenerates pages in the background, on a schedule or on-demand. |
The browser renders the pre-generated HTML, then optionally hydrates for interactivity. |
Islands |
You code mostly static templates + isolated interactive components, such as custom elements. |
A build step outputs static HTML plus small, per-island JS bundles. |
The server serves static HTML (like SSG), optionally rendering per request. |
The browser renders the static HTML and hydrates only the islands independently – or resumes them, in Qwik’s case. |
Compare where HTML is created: a static site ships hand-written files, SSG generates files at build time, and server-side rendering creates HTML on request. section 2.1.4
SSG suits documentation, blogs, marketing pages, course material, and product catalogs with periodic updates. It also gives public routes meaningful HTML immediately, unlike a shell-only single-page application that must run its client router before showing route content. Choose it for the requirements—not because every site must be static. Content that cannot be known until a request arrives calls for a different rendering decision. section 14.5 section 10.2
A small implementation can keep the contract explicit:
- Read content files, apply templates, and write HTML during a build step. section 14.5.2
- Deploy the generated files to a static server; add JavaScript only where interaction needs it. section 14.5
- If choosing Eleventy, Astro, Hugo, Jekyll, or another generator, check that its output works without JavaScript, supports the required metadata, and remains portable. For a large content set, check partial-build support. section 14.5.2
Generated pages are still web pages, not a reason to discard HTTP behavior. Ensure missing public routes receive a real 404 rather than an application shell with a 200 OK. section 10.2




