← All writing
Technical

Building a content-first site with Astro

A short tour of typed content, static routes, and an editing workflow that stays simple.

The best content workflow is often the one that stays close to the project. Astro content collections let posts live alongside code while giving frontmatter a schema.

Start with the shape of your content

Define the fields your pages actually use. A schema catches missing titles and invalid categories before deployment.

const categories = ['technical', 'tutorial', 'til'] as const;
type Category = (typeof categories)[number];

Generate static routes

Each published entry becomes a page at build time. This keeps the deployed site fast and easy to host.

Keep drafts private

Filter drafts in the shared content helper so listings, static paths, and RSS use the same publishing rule.

Keep the reading experience quiet

Clear typography, useful headings, and a table of contents make a long article easier to navigate.