Quick Start
Create a markdown file
Create a new The filename (without
.md file in src/content/blog/ with a descriptive slug:.md) becomes the URL slug: /blog/post/my-new-postFrontmatter Format
Every blog post must start with YAML frontmatter enclosed by---:
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
title | string | ✅ | Post title displayed in listing and individual page |
description | string | ✅ | Brief description for SEO and post cards |
date | string | ✅ | Publication date (e.g., “Jan 30, 2026” or “August 14, 2025”) |
readTime | string | ✅ | Estimated reading time (e.g., “5 min read”) |
image | string | ✅ | Path to hero image (relative to public folder) |
slug | string | ✅ | URL slug (should match filename without .md) |
author | string | ⬜ | Author name (defaults to “Luan Nguyen”) |
tags | array | ⬜ | Array of tags for categorization |
category | string | ⬜ | Post category (e.g., “Career & Experience”, “Technology”) |
excerpt | string | ⬜ | Custom excerpt for SEO (auto-generated if not provided) |
The
slug field should match your filename without the .md extension. For example, if your file is my-post.md, the slug should be my-post.Real Example
Here’s a real post from the portfolio: File:src/content/blog/intern-experience-aws.md
Image Guidelines
Storing Images
Store blog images in thepublic/blogs/ directory:
Using Images
Reference images in frontmatter and markdown:Image Styling
Images in blog posts receive automatic styling:- Rounded corners with shadow effects
- Hover zoom animation (1.05x scale)
- Figure captions using the alt text
- Max width of 2xl for optimal readability
- Lazy loading for performance
src/lib/blog.ts:193
Content Writing Tips
Start with an engaging opening
Use quotes, personal anecdotes, or thought-provoking questions to hook readers.
Build Process
Blog posts are processed at build time:File Reading
getSortedPostsData() reads all .md files from src/content/blog/File: src/lib/blog.ts:28Testing Your Post
Before deploying:Common Issues
Post Not Appearing
Build Errors
Common causes:- Invalid YAML in frontmatter
- Missing required fields
- Special characters in title not escaped
- Malformed image paths
Styling Issues
The markdown processor sanitizes HTML, so:- Don’t use raw HTML tags (use markdown instead)
- Custom CSS classes won’t work in markdown
- Use standard markdown syntax for best results
Next Steps
Markdown Support
Learn about supported markdown syntax and features
Blog Overview
Review blog architecture and components