astro-content-collections-minimal is a minimal theme Integration for Astro, built with Content Collections.
Simply place Markdown (.md) files in the src/content/ directory, and routing and layout will be applied automatically to generate a complete site.
Prerequisites
This package is designed to be installed in Astro v6 or later projects.
It uses Tailwind CSS (v4) and @tailwindcss/typography for styling. Your Astro project must also have Tailwind CSS set up.
Getting Started
Start from the Starter Template
npm create astro@latest -- --template ryotahagihara/astro-content-collections-minimal-starter
This creates a project with Tailwind CSS and Content Collections already configured.
Add to an Existing Project
Install the package in your Astro project that already has Tailwind CSS (v4) and @tailwindcss/typography set up.
npm install astro-content-collections-minimal
See npm for package details.
1. Add the Integration
// astro.config.mjs
import { defineConfig } from "astro/config";
import contentCollectionsMinimal from "astro-content-collections-minimal";
export default defineConfig({
integrations: [
contentCollectionsMinimal({
siteTitle: "My site", // Required: site title
styles: "./src/styles/global.css", // Required: path to the CSS entry file containing Tailwind directives
}),
],
});
2. Configure Content Collections
// src/content.config.ts
import { defineCollection } from "astro:content";
import { pagesLoader, pagesSchema } from "astro-content-collections-minimal";
const pages = defineCollection({
loader: pagesLoader(),
schema: pagesSchema(),
});
export const collections = { pages };
3. Create Content
Create Markdown files under src/content/. index.md becomes the home page.
src/content/
├── index.md → /
├── about.md → /about
└── guide/
└── setup.md → /guide/setup
4. Frontmatter
You can specify the following frontmatter at the top of each Markdown file. All fields are optional.
---
title: "Page Title"
description: "Page description"
date: 2026-04-01
---
# Your content here...
Pages
- Features — Details on what this package provides
- Customization — Configuration options and component overrides
- Nested Page Example — Routing with directory structure