Content Collection
A way to organize related content files (like blog posts or glossary terms) so your site can automatically find, validate, and display them.
A content collection is a way for your website framework to manage groups of related content, like blog posts or glossary terms, as a single organized unit with consistent structure. You define a schema (basically a template of required fields), and every entry in the collection gets validated against it automatically at build time. This means the framework handles all the wiring for you: finding content files, checking that they have the right fields, and making them available to your pages through a clean query API.
The Simple Version
Imagine a filing cabinet where every folder follows the same format: same label position, same fields filled in, same structure. A content collection is that filing cabinet for your website. You define the format once, then every piece of content that goes in has to match it.
If a blog post is missing a title or a glossary term is missing a definition, the system catches it before the site ever goes live.
Why It Matters
Without content collections, adding a new blog post or glossary term means manually wiring it into the site. With them, you just drop a new file in the right folder and the site picks it up automatically. It’s the difference between maintaining a spreadsheet by hand and having a system that validates and organizes entries for you.
How It’s Used on This Site
This site has two content collections: one for blog posts (src/content/blog/) and one for The Vibe-Coder’s Dictionary (src/content/glossary/). Each collection has a schema that defines what fields are required. The blog collection expects a title, description, date, and tags. The glossary collection expects a term, definition, tags, and related terms. Astro validates every entry at build time, so a typo in the frontmatter gets caught before it ever reaches the live site.
Related Articles
How I fixed a broken visual identity using ChatGPT for logo design and brand tokens, then handed a structured markdown file to Claude Code to execute the CSS migration and replace a static hero with an AI-generated animation.
The homepage projects section started as two project cards and a plain blog promo box. Here is why that changed, what the redesign does differently, and what the decision reveals about building in public.
How a glossary of technical terms for non-technical readers grew out of the same AI workflow that builds the site itself. Content collections, structured data, and Claude Code doing the heavy lifting.
How two plain-text files turned an AI coding assistant into a persistent, self-improving build system. The architecture behind scottkrukowski.com, explained for non-engineers.
Browse the Full Dictionary