Building a Site with Astro 5
I recently rebuilt this site using Astro 5 and wanted to share some notes on the process.
Content Collections
Astro’s content collections are a great way to manage structured content. You define a schema with Zod, drop markdown files into a directory, and Astro handles the rest — type-safe frontmatter, automatic slug generation, and built-in rendering.
const blog = defineCollection({
schema: z.object({
title: z.string(),
date: z.coerce.date(),
}),
});
Tailwind v4
The new Tailwind v4 integrates directly as a Vite plugin. No more config files — just import it in your CSS and start writing classes. The @theme directive lets you define design tokens right in CSS.
Deployment
GitHub Pages works seamlessly with Astro’s static output. A simple GitHub Actions workflow handles the build and deploy on every push to main.
Overall, the developer experience has been excellent. Astro’s island architecture means the site is fast by default, and I only add interactivity where it’s actually needed.