---
title: "Astro Content Collections"
description: "Base setup on top of headless services to help you get started quickly"
language: "English"
url: "https://head-start.pages.dev/en/documentation/content-collections/"
---

Copy page

* [Open in Claude ](https://claude.ai/new?q=Read+from+this+URL%3A+https%3A%2F%2Fhead-start.pages.dev%2Fen%2Fdocumentation%2Fcontent-collections%2F+and+explain+it+to+me.)
* [Open in ChatGPT ](https://chatgpt.com/?hints=search\&q=Read+from+this+URL%3A+https%3A%2F%2Fhead-start.pages.dev%2Fen%2Fdocumentation%2Fcontent-collections%2F+and+explain+it+to+me.)

# Astro Content Collections

!Note: this page is auto-generated from [docs/content-collections.md](https://github.com/voorhoede/head-start/tree/main/docs/content-collections.md).

Astro's Content Collections allows you to prepare a dataset on build time to query it later in your templates. This means it can also act als a caching layer. View the [Astro documentation](https://docs.astro.build/en/guides/content-collections/) for more information.

Like Astro Content Collections `src/content/config.ts` is used to define the collections. And like Astro, Head Start uses the `getCollection()` and `getEntry()` functions to retrieve data from these collections, but you should use the `~/lib/content` module instead of `astro:content`.

## Differences from Astro's Content Collections

Head Start's Content Collections are similar to Astro's, but with some differences:

* `getEntry` returns live data in development and preview environments.

* `getCollection` and `getEntry` support localized data. Any lookup will first try to search by the current locale, but you can also pass a `locale` parameter to specify a different locale.
