Post collections
Create blogs, changelogs and more with post collections.
Post collections are a way to create a time-based collection of posts, like blogs or changelogs. Basedoc auto-generates paginated index pages, RSS feeds and individual post pages.
There are three parts to setting up post collections:
- Creating post files in a specific directory
- Defining your post collection in the
basedoc.jsonconfig file - Adding post-specific frontmatter to your posts
Creating a post collection
Post collections are simply a directory in your repo, which contains posts. Every file in the directory is considered a post.
For example, if you have a directory called blog in your project, every file in it will be a post on your blog.
Post collection config
To make Basedoc aware of your post collections, use the postCollections configuration option in your basedoc.json file.
You can add multiple post collections to your project.
{
"postCollections": [
{
"directory": "blog",
"title": "Blog",
"description": "The Acme, Inc. blog."
},
{
"directory": "changelog"
}
]
}directory: the folder containing your post files (e.g., "blog", "changelog"). The folder name will become the URL path of your post collection.indexLayout: (optional) the layout of the index page. Can be "list", "list-full" or "list-compact". Default: "list"pageSize: (optional) the number of posts to show per page. Default: 15title: (optional) the title of the post collection. Defaults to capitalised directory name.description: (optional) the description of the post collection. Shown on index page and in meta tags
Add to navigation
To add a link to your post collection to your site navigation, add the directory name (e.g., "changelog") to the navigation array in your basedoc.json file. Basedoc will automatically use the title from your post collection config as the link text. To override the link text, use the object syntax with a title and path property. Learn more about navigation.
{
"navigation": [
"changelog"
]
}{
"navigation": [
{"title": "News & Updates", "path": "changelog"}
]
}Post collection frontmatter
Each post in a post collection has frontmatter like a regular page, but with the addition of a few post-specific keys.
---
title: "My post"
description: "This is an excerpt of my post."
date: "2026-02-01"
lastUpdated: "2026-02-04"
image: "/media/my-post.jpg"
author: "John Doe"
---title: The title of the post.description: (optional) The excerpt of the post. This is shown in the index page and post page.date: The date the post was published.lastUpdated: (optional) The date the post was last updated.image: (optional) The image for the post. The image should be stored in the/mediadirectory, but could be in a well-named subdirectory like/media/blog/my-post.jpg.author: (optional) The author of the post. This name will be shown in the index page and post page.
Post collection index page
Basedoc automatically creates the index page and paginated pages for your post collections.
There are three different layouts available for your index page. You can define this in your basedoc.json file using the indexLayout key.
list: A list layout with an image, title, date and excerpt for each post (the default).list-full: Same aslist, but with the full post content instead of the excerpt.list-compact: A compact layout with a date, title and excerpt for each post.
{
"postCollections": [
{
"directory": "blog",
"indexLayout": "list-compact"
}
]
}RSS feed
Basedoc automatically creates an RSS feed for your post collections. The last 100 posts (ordered by date values) are included in the feed.
The RSS feed is available at /<post-collection>/rss.xml.
For example, if you have a post collection called blog, the RSS feed will be available at /blog/rss.xml.
The RSS feed is updated whenever a new build is published to your live site.
Preview builds also have RSS feeds, so you can test how post collections will look in RSS readers.
More info
Like regular pages:
- Posts are included in your site search.
- Posts are included in your llms.txt file.
- A Markdown version of each post can be accessed with the
.mdextension.

