src/content/blog/ as markdown files with frontmatter defining metadata.
Blog Collection Schema
The blog collection is defined insrc/content.config.ts with the following schema:
string
required
The title of your blog post. This appears as the main heading and in meta tags.
string
required
The author’s name (e.g., “Lewis Kori”)
array
required
An array of tag strings for categorization (e.g.,
["Writing", "Learning", "Clarity"])string
required
A brief summary of the post. Used for SEO meta descriptions and post previews.
date
required
Publication date in YYYY-MM-DD format (e.g.,
2025-09-16)string
Optional path to a cover image for the post (e.g.,
/blog/my-post-cover.jpg)string
Optional series name to group related posts together (e.g.,
"Human + AI")array
Optional array of sponsor names (e.g.,
["Scraper API"])string (URL)
Optional canonical URL if the post was originally published elsewhere
Creating a New Blog Post
1
Create a new markdown file
Navigate to
src/content/blog/ and create a new .md file. Use kebab-case for the filename:2
Add frontmatter
Start your file with YAML frontmatter containing all required fields:
3
Write your content
Below the frontmatter, write your post content using markdown:
4
Preview and publish
Run your development server to preview the post:The post will be automatically available at
/blog/my-new-postWorking with Series
Series allow you to group related blog posts together. When you add aseries field to your frontmatter, posts with the same series name will be linked together.
Example: Creating a Series
All posts with
series: Human + AI will be automatically grouped and can be displayed together on your site.Adding Sponsors
If your blog post is sponsored, you can list sponsors in the frontmatter:Real-World Examples
Example 1: Simple Blog Post
Example 1: Simple Blog Post
Example 2: Post with Series and Sponsors
Example 2: Post with Series and Sponsors
File Organization
Blog posts are stored insrc/content/blog/ with the following structure:
The filename becomes the URL slug. For example,
why-i-write.md will be accessible at /blog/why-i-writeBest Practices
- Use descriptive filenames - Keep them concise but descriptive, using kebab-case
- Write clear descriptions - Your description is used for SEO and social media previews
- Tag strategically - Use 3-6 relevant tags that help categorize your content
- Set accurate dates - The
dateCreatedfield determines post ordering - Optimize images - If using
cover_image, ensure images are optimized for web - Group with series - Use series to create cohesive content collections