Static site generator, explained
Rather than building a page each time someone visits, the generator builds every page once, ahead of time. The result is a folder of files that a host or CDN can serve straight away.
This tends to mean fast pages and less to attack, since no database runs for each visit. It also tends to cost little to host, because serving files is simple work.
Content can come from Markdown files, JSON or a headless CMS. When content changes, the site rebuilds, which can be automatic through a webhook.
The trade-off is build time and freshness. Very large sites take longer to rebuild, and live data needs a separate script or a server route. Modern tools such as Astro let you mix static and server pages.



