A static site generator turns Markdown and templates into plain HTML files at build time, which any host or CDN can serve quickly. Hugo builds fastest; in our test it turned 1,000 posts into pages in under half a second. Eleventy is the most flexible, and Astro is the best fit when some parts need interactive components.
| If you | Use |
|---|---|
| Want the fastest builds for thousands of pages | Hugo |
| Want plain JavaScript and few opinions | Eleventy |
| Need some interactive components | Astro |
| Already have a React or Next.js codebase | Next.js static export |
Updated
We gave Astro, Eleventy and Hugo the same 1,000 Markdown posts and timed three clean builds of each, so the numbers compare like with like. Below the results, the same post page in each tool shows what working with it feels like.
Writing the content first? Keep the Markdown cheat sheet.
Same 1,000 posts in each tool, output deleted before every run. Repeat runs are faster because the tools and the operating system have warmed caches.
| Generator | First run | Repeat runs |
|---|---|---|
| Hugo 0.167 | 0.40 | 0.28 |
| Eleventy 3.1 | 1.34 | 0.51 |
| Astro 7.3 | 3.33 | 0.97 to 1.01 |
| Astro | Hugo | Eleventy | Next.js export | Jekyll | |
|---|---|---|---|---|---|
| Language | JavaScript / TypeScript | Go (single binary) | JavaScript | JavaScript / TypeScript | Ruby |
| Templates | .astro, plus React, Vue, Svelte | Go templates | Nunjucks, Liquid, WebC, JS and more | React | Liquid |
| JavaScript shipped by default | None | None | None | React runtime | None |
| Interactive parts | Islands with client directives | Add your own scripts | Add your own scripts or WebC | Any React component | Add your own scripts |
| Licence | MIT | Apache-2.0 | MIT | MIT | MIT |
| Best for | Content sites that need a few interactive parts | Very large sites, fast builds | Flexible, minimal sites | React teams wanting static output | GitHub Pages blogs |
The collection checks each post's front matter against a schema, and getStaticPaths makes one page per post at build time.
// src/content.config.ts
import { defineCollection, z } from "astro:content";
import { glob } from "astro/loaders";
const posts = defineCollection({
loader: glob({ pattern: "*.md", base: "./src/content/posts" }),
schema: z.object({ title: z.string(), date: z.coerce.date() }),
});
export const collections = { posts };
// src/pages/posts/[id].astro
---
import { getCollection, render } from "astro:content";
export async function getStaticPaths() {
const posts = await getCollection("posts");
return posts.map((post) => ({ params: { id: post.id }, props: { post } }));
}
const { post } = Astro.props;
const { Content } = await render(post);
---
<h1>{post.data.title}</h1>
<Content />A posts.json file in the folder applies the layout to every Markdown file inside it, through Eleventy's data cascade.
// posts/posts.json
{ "layout": "post.njk" }
// _includes/post.njk
<!doctype html>
<html>
<head><title>{{ title }}</title></head>
<body>
<h1>{{ title }}</h1>
{{ content | safe }}
</body>
</html>
// build
npx @11ty/eleventyHugo picks this template for each page in content/. .Content is the rendered Markdown.
# hugo.toml
baseURL = "https://example.com/"
title = "My site"
<!-- layouts/_default/single.html -->
<!doctype html>
<html>
<head><title>{{ .Title }}</title></head>
<body>
<h1>{{ .Title }}</h1>
{{ .Content }}
</body>
</html>
# build
hugoSetting output to export writes plain HTML files to the out folder at build time. Features that need a server, such as server actions and on-demand rendering, are not available in this mode.
// next.config.js
/** @type {import('next').NextConfig} */
module.exports = {
output: "export",
images: { unoptimized: true }, // the default image optimiser needs a server
};
// build -> ./out
npx next build
If the people updating the site are not comfortable with Markdown and Git, a hosted website builder or a CMS with a visual editor will save a lot of hand-holding. Generators shine when developers own the site or when a CMS feeds them content.
A way of building sites as prebuilt HTML, CSS and JavaScript served from a CDN, with dynamic features added through APIs. Static site generators produce the prebuilt part.
For plain Markdown pages, yes, by a wide margin in our test: about 0.3 seconds against about 1 second for 1,000 posts once warmed up. Astro does more per page, such as type-checked content and component rendering.
Yes. Forms can post to a form service or a serverless function, and search can run in the browser from a prebuilt index. Neither needs a traditional server.
Very. Every page is complete HTML on first load, fast to serve and easy for crawlers to read. You still need good titles, descriptions, internal links and a sitemap.
Related: Frontend framework comparison, Headless CMS compared, Markdown cheat sheet, XML sitemap generator, All free tools.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.