Skip to content

Home Blog How I Built a Static Site with...

How I Built a Static Site with Astro — Zero JavaScript by Default

2026-05-12 tech

The Problem

Our original site was built with Next.js 14. It was fine — but every page shipped ~200KB of JavaScript whether it needed it or not. For a content site about street food, that’s absurd. Nobody needs React hydration to read about noodles.

The Switch to Astro

Astro’s philosophy is simple: zero JavaScript by default. You can add interactive components (React, Vue, Svelte) where needed through “Islands” — and the rest of the page is pure HTML and CSS.

// Only this component ships JS to the browser
<ChinaMap client:load />

// Everything else is static HTML
<h1>China Street Eats</h1>

Results

MetricNext.jsAstro
JS per page~200KB~3KB
Lighthouse score7298
Build time12s1.5s
Pages3060+

What Worked

  • Content Collections — Type-safe MDX with Zod schemas
  • Sitemap + RSS — Built-in, zero config
  • Vercel/Cloudflare deployoutput: 'static' just works
  • Tailwind + inline styles — No runtime CSS-in-JS

The best part? The site feels faster because there’s nothing to hydrate. Click a link, page loads. That’s it.

Support the Author

If you enjoyed this article, buy the author a cup of tea ☕

WeChat Pay

WeChat Pay

Alipay

Alipay

Scan with WeChat or Alipay to send a tip

Comments

Related Posts

The Secret Behind Lanzhou Beef Noodles — 200 Years of Hand-Pulled Tradition food Northern and Southern Chinese Noodles: A Clear Comparison of Flavors and Styles food Why Sichuan Food Makes Your Lips Numb — The Science of Málà food

Get Weekly Street Food Picks

One email every Friday with the best new city guides, trending snacks, and reader favorites. No spam, ever.

No spam. Unsubscribe anytime.

Powered by Buttondown.