Astro 6 Demo

Fonts API + migrated content layer in the current blog

This page demonstrates one Astro 6 feature directly in the UI and one that powers the project under the hood.

Visible demo: Fonts API

The headline on this page is loaded with Astro 6's built-in Fonts API using a locally configured Roboto font family and a page-scoped <Font /> component.

Astro 6 ships a first-class Fonts API.
This paragraph stays on the site's regular typography so the contrast is easy to see.

Project demo: Content Layer API

The list below is read from the migrated posts collection using the Astro 6 content layer setup in src/content.config.ts.

Astro 6 highlights

Built-in Fonts API

Use Astro's new Fonts API with a page-scoped <Font /> component and a local font provider.

Content Layer API

This project now uses src/content.config.ts with explicit glob() loaders and Astro 6 entry APIs.

Stable CSP Support

Astro 6 ships a stable Content Security Policy API that can hash scripts and styles for static sites.

Modernized Tooling

Astro 6 upgrades the toolchain around Node 22, Vite 7, and newer package internals.