Why Astro is my default for websites
Most business websites are content plus a few interactive parts, such as a gallery, a booking enquiry or a filter. Astro is designed for that. Pages render to HTML at build time, and only the interactive parts load JavaScript.
On motion-heavy builds this matters even more. Eastern Condiments uses GSAP, ScrollTrigger, Lenis and Matter.js, but all of it is lazy-loaded through data-* hooks, and every module respects prefers-reduced-motion, so the content is readable before, and without, any of it.
A content model instead of hardcoded pages
I keep editorial content out of components. A typical project has:
src/content/…: typed copy, navigation, products, listings and SEO fields.src/assets/…: source images, which Astro converts to AVIF/WebP at several widths.- Unit tests that assert content integrity: unique slugs, every image present, every internal reference resolving.
On the Eastern rebuild, those tests also assert that every one of the 442 URLs in the original site’s sitemap is either rebuilt or redirected to a real page.
Illustrative example: a typed collection with references
// src/content/config.ts
import { defineCollection, reference, z } from "astro:content";
const projects = defineCollection({
type: "content",
schema: ({ image }) => z.object({
title: z.string(),
cover: image(), // must exist, gets optimised
technologies: z.array(reference("technologies")), // must point at a real entry
}),
});
Where I don’t use Astro
When a product needs authenticated users, carts, real-time dashboards or lots of client state, I use Next.js. Astro can host islands of that, but past a certain point you’re rebuilding an app framework inside a site framework.