Blog

What are content collections in Astro?
Content collections are Astro's built-in system for managing groups of related content, such as blog posts, documentation pages, authors or produ
Dive Deeper
How to use the Content Layer API in Astro?
To use the Content Layer API in Astro, give every collection in src/content.config.ts a loader. For local files, use the built-in glob() or
Dive Deeper
How to read and set cookies in Astro?
To read and set cookies in Astro, use the Astro.cookies object in pages and components, or context.cookies in API endpoints, middleware a
Dive Deeper
How to improve Core Web Vitals in an Astro site?
To improve Core Web Vitals in an Astro site, work on each metric with the tool Astro already gives you. For Largest Contentful Paint (LCP), r
Dive Deeper
How to create a custom 404 page in Astro?
To create a custom 404 page in Astro, add a file named 404.astro (or 404.md) to src/pages/. Astro builds it to dist/404.html, which most st
Dive Deeper
How to load custom fonts efficiently in Astro?
The most efficient way to load custom fonts in Astro is the built-in Fonts API, which has been stable since Astro 6. You register each font in th
Dive Deeper