creating blog posts

published: August 1, 2025updated: August 24, 2026โ€ข
on this page

This guide explains how to create blog posts for the site.

Quick Start

  1. Create a new .mdx file in src/content/posts/
  2. Add the required frontmatter
  3. Write your post
  4. Build and preview

Required Frontmatter

Blog posts need this frontmatter:

blog-post.mdxyaml
---
title: 'Your Post Title'
description: 'Brief description for SEO and previews'
publishDate: 2025-08-01
author: 'Michael Bommarito' # optional, this is the default
tags: ['web-dev', 'astro']
image: '/images/posts/your-image.png' # optional
category: 'Security' # optional
draft: false # set true to hide from listings
---

The full schema lives in src/content/config.ts under the posts collection.

File Naming Convention

Use the post slug alone โ€” no date prefix. The URL is derived from the filename:

post-slug.mdx

Example: compression-as-copying.mdx publishes at /blog/compression-as-copying.

Categories

category is optional and lightly used; most posts rely on tags instead.

Adding Images

Place images in public/images/posts/ and reference them:

![Alt text](/images/posts/image-name.png)

Or set image in the frontmatter for the post header.

Draft Posts

Set draft: true to work on posts without publishing:

---
title: 'Work in Progress'
draft: true
---

Writing Tips

  • Start with a compelling introduction
  • Use headers to structure content
  • Include code examples where relevant
  • Add relevant tags for discoverability
  • Keep paragraphs short and scannable

Publishing Workflow

  1. Write your post with draft: true
  2. Preview locally with npm run dev
  3. When ready, set draft: false
  4. Commit and push your changes
on this page