Create blog posts, articles, and written content
Text collections are for written content like blog posts, articles, and news updates.
Creating a Text Post
Using the CLI
astrolock content blog "My Blog Post Title"
This creates a file at content/blog/my-blog-post-title.md with starter frontmatter.
Manual Creation
Create a .md file in your collection folder:
---
title: "My Blog Post"
date: 2025-01-15T00:00:00Z
author: "Your Name"
description: "A brief summary for search engines and previews"
categories:
- Technology
tags:
- Tutorial
- Beginner
---
Your content starts here. Write in Markdown.
## A Subheading
More content...
Frontmatter Fields
Required
| Field | Description |
|---|---|
title | The post title (displayed as heading) |
Recommended
| Field | Description | Example |
|---|---|---|
date | Publication date | 2025-01-15 |
author | Content author | "Your Name" |
description | SEO summary (160 chars) | "Learn how to..." |
image | Featured image path | "/images/content/blog/hero.jpg" |
Optional
| Field | Description |
|---|---|
categories | Content groupings (list) |
tags | Keyword labels (list) |
draft | Set true to hide from site |
toc | Table of contents settings |
Info
See Text Frontmatter Reference for all fields.
Adding Images
Featured Image
Set in frontmatter:
---
title: "My Post"
image: "/images/content/blog/my-post.jpg"
---
Warning
Put the actual image file at public/images/content/blog/my-post.jpg
Inline Images
Use Markdown image syntax in your content:

Categories and Tags
Organize your content with categories and tags:
---
title: "Getting Started with React"
categories:
- Development
- Frontend
tags:
- React
- JavaScript
- Tutorial
---
Categories are broad groupings (usually 1-2 per post). Tags are specific keywords (as many as relevant).
Table of Contents
Open Table of Contents
Example: Complete Blog Post
---
title: "10 Tips for Better Writing"
date: 2025-01-15T00:00:00Z
author: "Jane Smith"
description: "Practical tips to improve your writing skills"
image: "/images/content/blog/writing-tips.jpg"
categories:
- Writing
tags:
- Tips
- Productivity
toc:
enable: true
---
Good writing takes practice. Here are my top tips...
## 1. Write Every Day
Consistency matters more than perfection.
## 2. Read Widely
The best writers are avid readers...
Next Steps
- Learn about Audio Collections for music content
- Explore Image Collections for galleries
- See Collection Configuration for all options
- Try MDX Components for enhanced content