Skip to main content

How to write a new post

This is a quick reference I wrote for myself. If you are reading the source code of this site, this post doubles as living documentation. Feel free to delete it later.

The short version

  1. Create a new file in src/content/blog/ with a .md extension.
  2. Add the required frontmatter at the top.
  3. Write your post in Markdown.
  4. Run npm run build and upload the dist/ folder.

Frontmatter template

Copy this block as the first thing in every new post, between two sets of three dashes:

title: 'Your post title here'
description: 'A short, one-sentence summary shown on the homepage and in search results.'
pubDate: 2026-04-24
tags: ['optional', 'tags', 'here']

Only title, description, and pubDate are required. You can also add:

  • updatedDate: 2026-05-01 — shown under the post meta when you edit later.
  • draft: true — hides the post from the homepage, RSS, and sitemap. Handy for work-in-progress.

Markdown basics

Anything you already know about Markdown works here:

Bold, italic, links, and inline code all just work.

Lists

  • Bulleted lists like this one
  • Are exactly what you’d expect
  • And can be nested
  1. Numbered lists
  2. Also work
  3. The same way

Code blocks

Triple backticks give you syntax-highlighted code:

function greet(name) {
  return `Hello, ${name}!`;
}

Quotes

Writing is thinking. To write well is to think clearly. That’s why it’s so hard. — David McCullough

Images

Drop images into public/images/ and reference them like this:

![A short alt-text description](/images/my-photo.jpg)

That’s really all there is to it. Write, save, build, upload.

You might also be interested