What a Static Site Generator Actually Does
A static site generator takes content, data, and templates and builds the HTML before anyone requests the page. The deployed site contains ready-made files instead of asking a server and database to assemble the same article for every visitor.
This works particularly well for blogs, documentation, portfolios, and marketing sites. The content changes when the site is rebuilt, while the finished pages can be hosted almost anywhere.
The build happens earlier
A typical project contains Markdown files, layouts, partial templates, and configuration. The generator combines them into HTML and often creates tag pages, feeds, sitemaps, and other repeated output.
That shifts work from request time to build time. Serving a completed file is simple and can be fast, though images, scripts, fonts, and third-party services can still make a static page slow. “Static” is an architecture, not a performance guarantee.
Why I like static sites
There is no public application server or content database to maintain for the generated pages. That reduces the attack surface and makes hosting straightforward. It does not make the whole system immune to security problems: the build pipeline, dependencies, forms, APIs, and hosting account still matter.
Content stored as files also works well with Git. Changes can be reviewed, reverted, and deployed through a normal build process.
The trade-off is that editors may need a content interface, and a large site can have meaningful build times. Personalised pages, logged-in dashboards, and frequently changing data usually need client-side APIs, server functions, selective rendering, or a different architecture.
Choosing a generator
Look at the things you will deal with every day:
- the language and template syntax;
- build speed on a site similar to yours;
- content and data organisation;
- image and asset handling;
- plugins or built-in features;
- deployment support;
- the quality of documentation and maintenance.
Popular options solve these problems in different ways. I would build one representative page before committing: include a layout, an image, a collection or taxonomy, and the deployment command.
A static site generator is a good fit when most visitors can receive the same prebuilt page. If the site needs dynamic features, add them where they help rather than assuming the whole site must become a server-rendered application.