Static Site Generation
Subject: Computer and Technology noun /ˈstæt.ɪk saɪt ˌdʒɛn.əˈreɪ.ʃən/ 1 definition
- web-development
- web-architecture
- web-performance
- software-engineering
-
Definition (noun)
Entry #96 · UpdatedStatic Site Generation (SSG) is a web development architecture and build process in which templates, content sources, and structured data are compiled ahead of time into self-contained static HTML, CSS, and JavaScript files ready for direct HTTP serving. Instead of executing application logic or querying databases on an origin server for every incoming request—as in traditional Server-Side Rendering (SSR)—SSG shifts page rendering to build time so assets can be cached and served globally from a Content Delivery Network (CDN) with low latency and a minimal server attack surface. Its primary boundary lies in content freshness and request-time personalization: while pre-built static pages excel for documentation, blogs, and marketing sites with shared content, highly dynamic or user-specific views must be supplemented with client-side API fetching or selective on-demand rendering.
Common Forms
Full-Build SSG: Compiles every route, template, and Markdown or headless-CMS entry into static files during a single build step, making it ideal for blogs, documentation portals, and small-to-medium sites using tools like Hugo, Jekyll, or Eleventy.
Incremental Static Regeneration (ISR): Rebuilds individual pre-rendered pages asynchronously in the background after a configurable revalidation window or webhook trigger, keeping large content-heavy sites fresh without a full redeployment.
Deferred Static Generation (DSG): Pre-builds high-traffic core routes during deployment while deferring compilation of rarely visited long-tail pages until their first request, after which the resulting static HTML is cached for all subsequent visitors.
Hybrid Static-Dynamic Rendering: Pre-renders shared public routes—such as landing pages and product catalogs—at build time while delegating authenticated dashboards, checkout flows, or real-time feeds to server-side rendering or client-side hydration.
Example
When a technical writer merges a pull request updating a Markdown API guide, a CI/CD pipeline runs a static site generator such as Astro or Hugo to compile the site into pre-built HTML, CSS, and JavaScript assets and pushes them to a CDN. Developers subsequently requesting
/docs/authenticationreceive the pre-rendered HTML document directly from nearby edge nodes in milliseconds without triggering an application server or database query.