Static Site Generators Guide: Jekyll, Hugo & Eleventy Compared (2026)
Most static-site-generator tutorials list every SSG under the sun and call it a day. This guide is different: it explains what an SSG actually does, walks the build pipeline from Markdown to deployed HTML, compares the big five (Jekyll, Hugo, Eleventy, Next.js, Astro) on the dimensions that matter, and shows where the build-versus-runtime tradeoff pays off. The goal is to help you pick the right generator for your project and ship it on GitHub Pages, Netlify, Vercel, or Cloudflare Pages without surprise.
What a Static Site Generator Actually Is
A static site generator (SSG) is a build tool that compiles templates and content into plain HTML, CSS, and JavaScript files before they are deployed. Once built, those files contain no server-side code and need no database. They are served exactly as they sit on disk or in a CDN cache. That is the entire premise, and it is also the entire appeal: the build step replaces the runtime.
The inputs are small and predictable:
- Content written in Markdown, MDX, AsciiDoc, or HTML fragments — one file per page or per post
- Templates that wrap content in a layout (Liquid, Nunjucks, Go templates, JSX, Astro components)
- Data files in YAML, TOML, or JSON for site config, navigation, taxonomies, and reusable metadata
- Assets — images, stylesheets, scripts — that the build copies, hashes, or transforms
The output is a directory of static files. You can scp it to a $5 server, push it to a CDN, or hand it to a managed host. There is no application server to keep alive, no database to back up, and no plugin chain to patch on a schedule. Compared to a dynamic CMS like WordPress or Drupal, you trade a runtime for a build step — and that build step is where most of the engineering happens.
This guide focuses on the comparison angle: Jekyll, Hugo, and Eleventy as the classic-content trio, with Next.js and Astro included for projects that need interactive components. If you want the broader developer-tools landscape around content workflows, the developer tools guide catalogs the surrounding chain — formatters, minifiers, converters, and validators you will reach for during an SSG build.
The Build Pipeline: Markdown to Templates to HTML to Deploy
Every SSG runs the same five-stage pipeline. The names differ, the file formats differ, but the shape is constant.
- Ingest content. The generator walks the content directory, parses front matter (YAML/TOML/JSON metadata at the top of each file), and reads each body. Markdown files become
{title, date, body}records. - Apply templates. Each record is matched to a layout — usually a hierarchy of base, section, and page templates — and rendered with the content variables. This is where templating languages (Liquid, Nunjucks, Go templates, JSX, Astro) earn their keep.
- Compose collections. Lists, archives, tags, RSS feeds, and sitemaps are generated from the collection of records. Taxonomy pages, pagination, and related-posts logic live here.
- Process assets. Images are copied or transformed, CSS and JS are bundled and hashed, and references in templates are rewritten to point at the hashed filenames. This is where the CSS and JS minification best-practices guide plugs in: minified output ships smaller, faster pages.
- Emit static files. The generator writes the final HTML, RSS, sitemap, robots.txt, and assets to a
dist/,public/, or_site/directory, ready to deploy.
What you do after the build is deploy: push the output directory to a host. Modern hosts (Netlify, Vercel, Cloudflare Pages) run the build for you on every push, so the pipeline collapses to "commit Markdown, wait, see live page." GitHub Pages runs Jekyll natively and skips the explicit build for simple sites. The deployment section below covers each workflow.
# Typical build commands (run locally or in CI)
hugo --minify # Hugo: builds to public/
npx eleventy # Eleventy: builds to _site/
bundle exec jekyll build # Jekyll: builds to _site/
npm run build # Next.js / Astro: builds to out/ or dist/
# Common output directories, then deployed as-is
ls public/ # Hugo
ls _site/ # Jekyll, Eleventy
ls out/ # Next.js (static export)
ls dist/ # Astro
A note on the input side: the Markdown that feeds an SSG is the same format our Markdown best practices and GitHub Markdown guide cover, and the conversion back and forth is exactly what the HTML to Markdown conversion guide, the HTML to Markdown tool, and the Markdown to HTML tool exist for. If you migrate content into an SSG from an existing HTML site, those tools are your first stop; if you are writing fresh content, the Markdown platforms guide shows how the same Markdown renders across SSGs and platforms.
The Big Five: Jekyll, Hugo, Eleventy, Next.js, Astro
Dozens of SSGs exist, but five cover the practical decision space in 2026: Jekyll (Ruby), Hugo (Go), Eleventy (JavaScript), Next.js (React), and Astro (multi-framework). The table below is the side-by-side summary; the prose underneath explains the tradeoffs you cannot see in a table.
| Generator | Language | Templates | Build Speed | Best For |
|---|---|---|---|---|
| Jekyll | Ruby | Liquid | Slow on large sites | GitHub Pages, small-to-mid blogs |
| Hugo | Go | Go templates | Fastest (ms for thousands of pages) | Large blogs, docs, marketing sites |
| Eleventy | JavaScript | Nunjucks, Liquid, MDX, etc. | Fast | Flexible blogs, custom pipelines |
| Next.js | JavaScript (React) | JSX/React | Medium (per-route, hybrid) | Hybrid SSG/SSR apps, marketing + product |
| Astro | JavaScript | Astro + any framework | Fast | Multi-framework content sites, zero-JS by default |
Jekyll — the Ruby original
Jekyll was the SSG that made the category popular, and it is still the default on GitHub Pages. Templates use Liquid, a Shopify-origin templating language that is forgiving and widely documented. The Ruby ecosystem means plugin installation requires Bundler and a Gemfile, which trips up developers who have never touched Ruby. Build speed is the main pain point: Jekyll on a 1,000-post blog is noticeably slow, and on a 10,000-post site it is painful. Pick Jekyll when GitHub Pages native support matters, when the team knows Ruby, or for small-to-medium blogs where build speed is irrelevant.
Hugo — the Go speed demon
Hugo ships as a single Go binary. No node_modules, no Gemfile, no Python venv. Build speed is the headline feature: tens of thousands of pages compile in seconds. Templates are Go's text/template language, which is terse and strict — opinionated about whitespace, somewhat verbose for conditionals, but very fast to execute. The plugin story is weaker than Jekyll or Eleventy because Hugo modules and shortcodes cover most needs but do not match the JavaScript ecosystem's breadth. Pick Hugo when the site is large, when you want a single binary deploy, or when build speed is critical.
Eleventy — the JavaScript escape hatch
Eleventy (11ty) is a Node-based SSG with no required template language. You can use Nunjucks, Liquid, EJS, Handlebars, MDX, or plain HTML — even mix them. The build pipeline is JavaScript, which means you can pull in npm packages, write custom shortcodes, and script data files in a way Jekyll's Liquid cannot. Build speed is fast on most sites and adequate on large ones, though not Hugo-fast. The tradeoff is that you inherit Node's dependency surface: package.json, lock files, and version drift. Pick Eleventy when you want full control of the build pipeline, when your team is JavaScript-first, or when you need a custom data layer.
Next.js — React with hybrid rendering
Next.js is a React framework that supports SSG (static generation), SSR (server-side rendering), ISR (incremental static regeneration), and client-side rendering, often on different routes in the same project. It is the right answer when a project needs both static marketing pages and dynamic app pages in one codebase. Templates are JSX/React, so you inherit React's component model, hooks, and the npm ecosystem. Build speed is medium because each route is compiled separately. Pick Next.js when the project is a React app that wants to ship static content, not when the project is a pure-content blog.
Astro — multi-framework, zero-JS by default
Astro is the newest of the five and the most architecturally distinctive. An Astro page can include React, Vue, Svelte, Solid, or Preact components, but by default Astro renders them to static HTML and ships zero JavaScript to the browser. You opt into client-side hydration per component with a directive like client:visible. The result is content sites that stay as fast as a pure SSG while still using the framework components your design system was built in. Build speed is fast. Pick Astro when you have existing framework components but want the performance of a static site, or for multi-framework documentation and marketing sites.
For a broader view of where SSGs fit in the developer-tool landscape, the developer tools guide places them alongside formatters, linters, and converters in a typical content pipeline.
Key Dimensions for Choosing an SSG
The five generators above differ along five dimensions. Score each one against your project before you commit.
| Dimension | What to ask | How the big five score |
|---|---|---|
| Build speed | How long does a clean build take at my expected page count? | Hugo fastest; Eleventy/Astro fast; Jekyll slow at scale; Next.js medium (per-route) |
| Learning curve | How long until a new contributor ships a page? | Jekyll easy if you know Liquid; Hugo moderate (Go template syntax); Eleventy easy if you know JS; Next.js steep (React); Astro moderate |
| Templating language | Is the template language ergonomic for the team? | Liquid (Jekyll), Go templates (Hugo), your choice (Eleventy), JSX (Next.js), Astro+any (Astro) |
| Plugin ecosystem | Are the plugins I need maintained? | Jekyll mature Ruby gems; Hugo modules + shortcodes; Eleventy large npm; Next.js Vercel + npm; Astro growing npm |
| Hosting | Does the host support this generator out of the box? | Jekyll native on GitHub Pages; all five deploy cleanly on Netlify, Vercel, Cloudflare Pages |
Build speed matters most for large sites — a 100-post blog builds in seconds on any of the five, but a 10,000-post docs site separates them sharply. Learning curve matters most for teams with rotating contributors; an SSG is not useful if no one but you can ship a page. Plugin ecosystem matters most when you need search, sitemaps, RSS, image processing, or syntax highlighting — and the code minification best practices guide covers the asset-pipeline end of that ecosystem. Hosting is the dimension where the field narrows: GitHub Pages runs Jekyll natively, but every modern static host runs all five without configuration.
Use-Case Fit: Blog, Docs, Marketing, Portfolio
The right SSG depends on what you are publishing. The four canonical use cases have different demands, and one generator rarely wins all four.
Blog
A blog is dated posts in reverse chronological order, plus archives, tags, and an RSS feed. Jekyll, Hugo, and Eleventy all do this out of the box. Hugo wins on speed for high-volume blogs; Eleventy wins on flexibility; Jekyll wins on GitHub Pages friction. Next.js and Astro are overkill unless the blog is part of a larger product site.
Documentation
Docs are hierarchical, versioned, and search-driven. Hugo, Eleventy, and Astro all work well, with Astro becoming a popular choice for component-driven docs because you can embed live framework examples. Pair any of them with Pagefind or Algolia for search, a sidebar nav template, and the writing conventions from the documentation best practices guide. The GitHub Markdown guide is also useful when docs live alongside code in a repo.
Marketing site
Marketing sites have a small number of high-polish pages with heavy design — landing pages, feature pages, pricing. Astro and Next.js win here because their component model supports design-system reuse and interactive hero sections without shipping the framework runtime. Hugo and Eleventy work but require more hand-rolled template composition. Performance matters: marketing pages should ship minimal JS, and Astro's zero-JS default is a structural advantage.
Portfolio
Portfolios are small (often a single page or a handful), rarely updated, and need to look distinctive. Jekyll, Hugo, and Eleventy all work; pick whichever template language you find least annoying. The simplicity is the feature: a portfolio that needs Next.js is probably trying to be a marketing site instead.
The No-Database Advantage
The defining structural property of an SSG-built site is the absence of a runtime database. Every benefit that follows — security, hosting cost, version control, CDN-friendliness — is a consequence of that single architectural fact.
Security: a smaller attack surface
A site with no database cannot be SQL-injected. A site with no server-side runtime cannot be exploited through remote code execution in a plugin. The realistic attack surface of a static site is the build environment and the deploy credentials — both of which exist for any site — plus the hosting account itself. You still patch your dependencies in package.json or Gemfile, but you patch them at build time, not under live traffic, and a compromised build does not expose reader data because there is no reader data.
CDN-friendly: cache everything, forever
Every URL on a static site resolves to a file. Files are embarrassingly cacheable: no Vary negotiation, no per-user session, no Origin revalidation needed for correctness. A CDN can serve the entire site from the edge, and the only reason to invalidate is a deploy. Add content-hash filenames for assets (Hugo, Eleventy, Next.js, and Astro all do this) and you get immutable caching for free.
Version control: content is code
Because content is Markdown in a git repo, every change has an author, a timestamp, and a diff. Editorial workflow is pull requests. Rollback is git revert. Code review applies to copy. For teams that already work this way, the SSG model is a free upgrade; for teams coming from a visual CMS, it is a workflow change worth making explicitly. The UUIDs you attach to content records (for stable cross-references, redirects, or analytics keys) are exactly what the UUID generator developer guide covers, and the data conversion tools professional workflows guide is the reference for moving content in and out of the repo from other formats.
The Build-Versus-Runtime Tradeoff
An SSG moves work from request time to build time. That single shift is the source of every advantage and every limitation.
| Property | Build-time (SSG) | Runtime (dynamic CMS) |
|---|---|---|
| Page generation | Once, at deploy | On every request |
| Time to first byte | CDN-cached, near-zero | Server processing per request |
| Personalization | Client-side or via API | Native, server-side |
| Content freshness | Requires a rebuild and redeploy | Immediate on save |
| Server requirements | None (static files) | Application server + database |
| Hosting cost | Free or near-free on CDNs (common current practice — verify) | Server, database, maintenance overhead |
The honest tradeoff is on the rows marked personalization and content freshness. A pure SSG cannot show a logged-in user their name in the navigation without client-side JavaScript or an API call. A pure SSG cannot publish a new post without a rebuild. Both gaps are addressable — incremental builds, hybrid rendering in Next.js and Astro, client-side hydration — but each is a workaround that adds complexity. The rule of thumb: if 95% of your pages are the same for every visitor and updates are batched, an SSG is the right call. If per-request variation is the norm, a runtime is the right call. The middle ground — Next.js or Astro with hybrid rendering — exists for projects that need both in one codebase.
Hybrid rendering is not free. Each route that switches to SSR adds a runtime dependency, a cold-start concern, and a hosting requirement that pure SSG sites do not have. The clean separation — static site for static content, separate API for dynamic behavior — is still the easiest model to operate, and the build pipeline (Markdown to HTML, deploy to CDN) stays linear.
Deployment Workflows: GitHub Pages, Netlify, Vercel, Cloudflare Pages
The four common current-practice static hosts cover the spectrum from zero-config to enterprise. All four offer free tiers as of common current practice — verify each platform's current plan page for bandwidth, build minutes, and collaborator limits before committing. Pricing and feature claims in this section are framed as common current practice and should be re-checked on the provider's site.
GitHub Pages
GitHub Pages runs Jekyll natively: push Markdown to a repo and the site builds automatically. Other generators work too, but require a GitHub Actions workflow that runs the build and pushes the output to a gh-pages branch. The free tier covers public repos with a generous bandwidth allowance (common current practice — verify). GitHub Pages is the right default for personal sites, project documentation, and anything already deeply tied to a GitHub repo.
Netlify
Netlify detects the SSG from your repo, runs the build in its own CI, and deploys to a global CDN. Form handling, serverless functions, and deploy previews on every pull request are the differentiators. The free tier covers most personal and small-team sites (common current practice — verify). Netlify's netlify.toml lets you pin the build command, the publish directory, and environment variables in the repo.
Vercel
Vercel is the company behind Next.js and is the natural deploy target for Next.js projects. Edge functions, image optimization, and analytics are first-class. Other SSGs deploy cleanly too, but the tightest integration is Next.js. The free tier covers personal and small-team projects (common current practice — verify). Vercel's deploy previews and comment-on-PR workflow are similar to Netlify's, with the bias toward Next.js patterns.
Cloudflare Pages
Cloudflare Pages runs builds on Cloudflare's Workers CI and deploys to the Cloudflare global network. The free tier is generous and includes unlimited bandwidth on the free plan (common current practice — verify). Cloudflare Pages is the right choice when global edge performance matters most, when you already use Cloudflare for DNS or Workers, or when you expect traffic spikes that free tiers on other hosts would throttle.
# GitHub Actions for a non-Jekyll SSG on GitHub Pages (simplified)
name: deploy
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm run build
- uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
# Netlify: netlify.toml
[build]
command = "npm run build"
publish = "dist"
# Cloudflare Pages: dashboard-driven, or wrangler
# Vercel: dashboard-driven, or vercel.json with buildCommand + outputDirectory
For broader context on which developer tools slot in around the deploy pipeline, the developer tools guide catalogs the chain end-to-end, and the calculator tools guide covers the helpers you reach for when sizing infrastructure for the traffic a successful static site actually receives.
The SSG Workflow: Write, Build, Deploy, Iterate
The day-to-day loop is the same regardless of generator. Tools do not replace it — they accelerate each stage.
Step 1: Write content in Markdown
Write each page or post as a Markdown file with front matter. Keep prose clean and semantic — the Markdown best practices guide covers structure, headings, links, and the conventions that survive a migration between SSGs. If you are migrating from an HTML source, run the pages through the HTML to Markdown tool and consult the HTML to Markdown conversion guide for the edge cases; the reverse direction is the Markdown to HTML tool when you need to inspect what your SSG will emit.
Step 2: Build locally before you push
Run the build locally with --drafts or the equivalent to catch broken links, missing front matter, and template errors before they hit CI. Most generators also support a local dev server with live reload — use it. The build output should be the same files the host will deploy; treat the dist/ directory as a contract.
Step 3: Deploy via git push
Commit the content and push. The host's CI runs the same build command you ran locally and deploys the output. Most hosts give you a deploy preview URL per pull request; review it before merge. The developer tools guide covers the surrounding CI helpers, and the code minification best practices guide documents the asset side of the build that runs alongside the SSG.
Step 4: Iterate with audits
After deploy, audit. Run a page-speed check on the live URL, validate the HTML, verify the sitemap and RSS feed render, and confirm internal links resolve. The developer tools guide lists the audit tools; the documentation best practices guide covers the editorial side — when to rewrite, when to refresh dates, and how to keep docs from going stale.
7 Common SSG Mistakes (and the Fix for Each)
- Picking the SSG before the use case. Choosing Next.js for a 20-post personal blog because the docs look impressive is the most common mistake. Fix: decide what you are publishing first, then match the generator to the use case (blog, docs, marketing, portfolio).
- Ignoring build speed at scale. A 50-post site builds in seconds on any SSG; a 5,000-post docs site does not. Fix: test a clean build at 2-3x your expected page count before committing, and prefer Hugo for very large content sets.
- Treating the build directory as editable. Editing files in
dist/or_site/by hand is wasted work — the next build overwrites it. Fix: edit only source Markdown, templates, and data files; treat the build output as a derived artifact and add it to.gitignore. - Shipping the framework runtime. Next.js or Astro sites that hydrate every component ship hundreds of KB of JavaScript for content pages that do not need it. Fix: default to static rendering, opt into hydration per component, and measure the shipped JS budget on real pages.
- Assuming free tiers are permanent. Free hosting tiers are common current practice but they change. Fix: read the plan page before launch, set a billing alarm, and keep a backup deploy workflow (a second host or a self-hosted fallback) for projects that need it.
- Skipping the sitemap and RSS feed. Search engines and readers expect both, and most SSGs ship plugins that generate them in one line of config. Fix: enable the sitemap and RSS plugins, verify the URLs in the build output, and submit the sitemap in Search Console.
- Migrating content without a Markdown pass. Pasting HTML into an SSG and calling it done leaves a site that is hard to edit and re-render. Fix: convert HTML content to Markdown with the HTML to Markdown tool, follow the conversion guide for edge cases, and write fresh content in Markdown from the start.
Every one of these is a workflow problem as much as a tooling problem, which is why the workflow section ends with audits rather than generation.
Frequently Asked Questions
Related Articles
Regex Testing Guide
The pillar for the regex family: pattern syntax, testing workflow, and how regex fits into a build pipeline alongside an SSG.
Regex Tester Guide
Mechanics and use cases for testing regex patterns you embed in templates, redirects, or build-time transforms.
Regex Tester Ultimate Guide
Advanced patterns — lookarounds, backreferences, atomic groups — for the build-time transforms an SSG pipeline needs.
Regex Tester Developer Guide
Developer workflows for testing and debugging regex inside the SSG content pipeline and CI.
Markdown Best Practices
How to write the Markdown that feeds every SSG — structure, semantics, and conventions that survive migrations.
Markdown Platforms Guide
Which platforms — including the major SSGs — render which Markdown features, and how to keep content portable.
GitHub Markdown Guide
GitHub-flavored Markdown specifics — the dialect most SSG source repos and Pages deploys use by default.
HTML to Markdown Conversion Guide
Migrating an existing HTML site into an SSG starts here — conversion workflow, edge cases, and tooling.
Code Minification Best Practices
CSS and JS minification in the SSG asset pipeline — the end of the build that ships smaller, faster pages.
Developer Tools Guide
The full developer-tool landscape around an SSG — formatters, minifiers, converters, and validators.
UUID Generator Developer Guide
Stable IDs for content records, redirects, and analytics keys — the cross-reference glue an SSG repo benefits from.
Data Conversion Tools Professional Workflows
Moving content in and out of the SSG repo from CSV, JSON, YAML, and other formats the data layer expects.
Conclusion: Pick the Build, Not the Buzz
Static site generators are a mature, well-understood category in 2026. The right answer is rarely the newest tool — it is the tool whose tradeoffs match your content. For most blogs, Jekyll, Hugo, or Eleventy are the practical shortlist. For interactive marketing sites, Astro and Next.js earn their place. For documentation, any of the five works, paired with a search plugin and the writing conventions from the documentation best practices guide. The build-versus-runtime tradeoff is the real decision, and once you make it honestly, the rest of the choices fall into place.
When you are ready to ship, write content with the Markdown best practices in mind, run the build locally, push to GitHub Pages, Netlify, Vercel, or Cloudflare Pages, and audit the live site. More guides on developer tools, content workflows, and data conversion are catalogued on the NoCostTools blog.