What a static site generator actually does
A static site generator takes source content — usually plain text files, often written in Markdown — and converts it into a folder of finished HTML, CSS, JavaScript and asset files. That conversion runs ahead of time, on a laptop or in a build pipeline, instead of on a server at the moment a visitor arrives. The result is unglamorous in the best way: a directory of files that almost any web server can hand out without running application code.
The detail that matters is when the HTML gets produced. A traditional content management system assembles each page on demand, querying a database and rendering templates for every request. A static generator does that work once and then stops thinking about it. A visitor’s request becomes a file lookup rather than an application execution, which is why these sites tend to feel fast even before anyone optimises them.
Why the approach keeps returning
Static generators are not new. The idea is roughly as old as the web itself, and every few years the industry rediscovers it under a new name. The reason is usually the same: the operational surface is small. There is no database to keep running, no application server to patch, no session store to debug at midnight. Deployment often means copying files to a host or pushing to a repository that a build service watches.
That small surface has real consequences:
- Fewer moving parts, which means fewer things that can fail independently at three in the morning.
- Cheap hosting, because serving files is the least demanding job a server can be asked to do.
- Version control for content, since the source lives in the same repository as the code.
- Predictable performance, because the expensive work happened before the request arrived.
None of these are automatic wins. They are consequences of a simpler architecture, and they only pay off if the content genuinely fits the model.
The tradeoffs that never quite disappear
Every request served from a pre-built file is a request that cannot be personalised on the fly. Anything that depends on who is asking — a logged-in dashboard, a shopping cart, a feed tailored to one user — needs something else running somewhere. Static sites handle this by delegating: a small API, a hosted service, or a serverless function does the dynamic part while the HTML stays static.
Build time is the other recurring cost. A site with a few hundred pages builds in seconds. A site with tens of thousands of pages can take minutes, and if the build reruns from scratch on every change, the editing loop becomes painful. Incremental and cached builds soften this, but they add complexity of their own: a generator that rebuilds only what changed must be very sure it knows what changed.
Static is not a property of a site. It is a property of how much of the site you can afford to decide in advance.
Where dynamic behaviour fits now
Modern tooling has blurred the line. Many generators now support server-side rendering, edge functions, or partial hydration, letting a page start as static HTML and pick up interactivity after it loads. This is useful, but it also means that “static” describes a spectrum rather than a category. A site can be static at build time, static at the edge, or static only for the parts that never change.
The practical question is not whether a site is static, but which decisions can be made early and which must wait for the request. Forms, search, authentication and payments almost always belong to the second group. Marketing pages, documentation and blog posts almost always belong to the first.
Choosing deliberately
A static generator is a good default for content-heavy sites that change on a human schedule: documentation, blogs, landing pages, portfolios. It is a poor fit for applications whose value depends on live data per user. Most teams end up with a hybrid, and that is fine. The goal is to be honest about which parts of the product genuinely need to run at request time.
If you are revisiting the idea, start with the content model rather than the tool. Decide how pages are structured, how they reference each other, and who edits them. A generator is only a translator between that structure and HTML. Get the structure right and the choice of translator matters far less than the marketing suggests.