Stack Guide
What to build a static site with in 2026
Marketing sites, documentation, blogs, and portfolios have one job: deliver HTML fast and never go down. That is a solved problem, and the solution is cheaper and better than it has ever been. This guide picks the stack, names the free tiers, and says when a simpler or older tool beats it.
About 6 min read. Recommendations verified August 2026.
The recommended static site stack
Everything here is free at the scale a content site actually runs at, and the output is plain HTML you could serve from any bucket if a vendor disappoints you.
| Layer | Pick | Why |
|---|---|---|
| Generator | Astro 7 | Ships zero JavaScript by default, adds islands only where you ask. Astro 7 landed in June 2026 on Vite 8 with a Rust compiler and markdown parser. |
| Content | Markdown in content collections | Typed frontmatter with schema validation at build time, so a missing description fails the build instead of the page. |
| Styling | Tailwind CSS v4 | One CSS import, no config file, and an output that only contains classes you used. Incremental builds are effectively instant. |
| Hosting | Cloudflare Pages | Static asset requests are free and unlimited on both the free and paid plans. No bandwidth meter to worry about when a post goes viral. |
| Search | Pagefind | Builds a static index at deploy time and searches it client side. No service, no API key, no monthly bill, works offline. |
| Images | Astro image component | Optimizes and emits width and height at build time, which is the cheapest fix for layout shift in Core Web Vitals. |
| Forms | One Cloudflare Worker | A contact form is 30 lines. The free tier covers 100,000 requests a day, which is more form posts than you will ever get. |
| CMS (optional) | Sanity or Payload | Sanity if you want a managed studio for non-technical editors. Payload if you want to own the Postgres database behind it. |
| Analytics | Cloudflare Web Analytics | Free, cookieless, and no consent banner in most jurisdictions. Upgrade to PostHog only when you need funnels and replays. |
| CI/CD | Git push | Pages builds on push and gives every branch a preview URL. There is no deploy pipeline to maintain. |
The verdict
Astro 7 with Markdown content collections and Tailwind v4, deployed to Cloudflare Pages on git push. Running cost: $0 forever, at any traffic level a content site will realistically see.
Why Astro wins the content site
The defining property of a good static site stack is what it does not ship. Astro renders to HTML and sends no JavaScript unless a component explicitly asks to hydrate. That is not a micro-optimization, it is the entire Core Web Vitals story: no framework runtime to parse, no hydration pass, no cumulative layout shift from client-rendered content.
Astro 7, released in June 2026, moved the compiler and the markdown parser to Rust and the bundler to Vite 8 with Rolldown. That matters at the boring end: a 500-page docs site that took two minutes to build now takes a fraction of that, and incremental dev rebuilds feel like editing a plain HTML file. Content collections give every markdown file a typed schema, so a broken frontmatter field breaks the build instead of shipping an empty meta description to production.
The second reason is escape velocity. Astro components are close enough to HTML that a designer can edit them, and you can drop a React, Svelte, or Vue island into one page without adopting that framework site-wide. If the project later grows an app section, you have not painted yourself into a corner. The one thing Astro is not is a full application framework - if your "static site" is going to grow a dashboard and a login, read Next.js vs Astro before committing.
On hosting, Cloudflare Pages wins on one line in the pricing page: requests to static assets are free and unlimited on both the free and paid plans, because a request only counts when it invokes a Function. A pure static site therefore never generates a bill, no matter how well a post does. Vercel's Hobby tier caps fast data transfer at 100 GB a month and is restricted to non-commercial use, so a company marketing site belongs on Pages or on Vercel Pro. The head-to-head is in Vercel vs Cloudflare.
Credible alternatives and when they win
Eleventy
Wins when you want a Markdown-to-HTML pipeline with essentially no framework in it. Template language of your choice, tiny dependency tree, and output you fully control. Choose it for personal sites, newsletters, and anything you expect to still build cleanly in five years. See 11ty.
Hugo
Wins on scale and stability. A single Go binary with no node_modules, building tens of thousands of pages in seconds. Choose it for large documentation sets and archives where build time and long-term reproducibility beat component ergonomics. See Hugo.
Next.js static export
Wins when the team is already deep in React and the site will grow an authenticated app within a year. You pay for it in shipped JavaScript, but you avoid a rewrite. If there is no app on the roadmap, this is the wrong trade.
Hand-written HTML plus a build script
Wins for sites under roughly 20 pages that one developer maintains. No generator to upgrade, no breaking major version, nothing between you and the output. It stops winning the moment a second person needs to add content.
Decision factors that change the answer
- Who edits the content. Developers editing Markdown in git need no CMS. Marketers who want a preview button need one, and that single requirement drives most of the rest of the stack.
- Page count. Under 200 pages, any generator is fine. Past a few thousand, build time becomes the daily bottleneck and Hugo's speed starts to matter more than Astro's component model.
- How interactive it really is. A pricing calculator or a search box is an island. A logged-in dashboard is an application, and you should be reading the SaaS stack guide instead.
- Content freshness. If pages must update within seconds of a database change, you want on-demand rendering or incremental regeneration, not a full static build.
- Lock-in tolerance. Every option here emits plain HTML to a folder, which means you can move hosts in an afternoon. Do not give that property up without a specific reason.
Static site stack questions, answered
Is Astro better than Next.js for a static site?
For a pure content site, yes. Astro ships zero JavaScript by default while Next.js ships a React runtime even for a page with no interactivity, and that difference shows up directly in Largest Contentful Paint on slow phones. Next.js wins the moment the same codebase also needs authenticated, dynamic application routes.
Do I need a CMS for a static site?
Only if someone who does not use git needs to publish. Markdown files in the repository give you version history, pull request review, and zero cost, which is strictly better for a developer-maintained site. Add Sanity or Payload the week a marketer asks for a preview button, not before.
Where should I host a static site for free in 2026?
Cloudflare Pages. Requests to static assets are free and unlimited on both the free and paid plans, so traffic spikes never produce a bill. Vercel's Hobby plan is also free but caps fast data transfer at 100 GB a month and is limited to personal, non-commercial projects.
At what point do static build times become a problem?
Somewhere between two and five thousand pages for most JavaScript generators, and much later for Hugo. Astro 7 pushed that ceiling up substantially by moving its compiler and markdown parser to Rust, but if a full build is already taking minutes, switch to incremental builds or move the largest section to Hugo.
Where to go next
Compare generators and meta-frameworks in frontend tools, weigh deploy targets in hosting, and settle the styling argument in CSS tools or Tailwind vs CSS Modules. Writing all this content in Markdown? Keep the Markdown cheatsheet open.