Blog
Content Layer Notes
Practical notes for keeping Astro content collections predictable.
Treat content as data
Typed frontmatter lets templates stay calm. Lists can sort by dates, details can render with shared prose styles, and tags become routes without hand-maintained indexes.
Use ids for routes
With the Content Layer API, the entry id is the stable slug for file-backed content. That keeps route generation explicit and avoids depending on a separate field.