SSGs generate HTML at build. The user receives static HTML.
SSG vs dynamic vs SPA
Dynamic โ server render. SPA โ browser. SSG โ build time.
Pros
Speed, security, cheap hosting, scalability, reliability.
Cons
Build time, dynamic content is hard, no real-time, external forms.
Popular SSGs
Hugo (Go, fast), Jekyll (Ruby, GitHub Pages), Gatsby (React), Next.js (React), Nuxt (Vue), Astro (islands), 11ty, Hexo.
Workflow
Content โ template โ build โ deploy โ CDN.
Content sources
Markdown, headless CMS, JSON, API.
Templates
Liquid, Nunjucks, Handlebars, JSX, Pug.
Deploy
Netlify, Vercel, GitHub Pages, Cloudflare Pages, S3.
Build optimisation
Incremental, parallel, cache.
Dynamic content in SSGs
Client-side JavaScript. External services. Serverless functions.
E-commerce on SSGs
Shopify Storefront, Snipcart, Commerce.js.
Real-time
Client fetch, ISR, on-demand revalidation.
SEO
HTML server-rendered. Core Web Vitals.
JAMstack
SSG is the core of JAMstack.
SSG vs WordPress
WordPress is dynamic. SSG is modern.
Headless WordPress + SSG
WP admin + Next.js frontend.
Mistakes
Forcing dynamic, ignoring build time, forms, SEO, images.
Use cases
Marketing, docs, blog, portfolio, landing.
Sayt.uz
PHP for now. Future โ Hugo for the blog, 100ms vs 800ms. Hosting supports SSG.