How to publish a post

The full workflow for adding a new blog post — from Markdown file to live page.

Publishing a new post is a three-step loop: write, open a PR, merge.

1. Add a Markdown file

Create a new file in src/posts/ with a URL-friendly filename — the filename becomes the post's slug. For example, src/posts/why-we-chose-eleventy.md publishes at /why-we-chose-eleventy/.

Every post needs frontmatter with at least a title and date:

---
title: Why we chose Eleventy
date: 2026-08-01
description: A short summary shown on the blog index and in link previews.
---

Everything after the frontmatter is the post body, written in standard Markdown. Fenced code blocks get syntax highlighting automatically:

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

2. Preview it locally

npm install
npm run serve

This starts a local server with live reload so you can check formatting and code blocks before opening a PR.

3. Open a PR and merge

Push the branch and open a pull request as usual. Once it's merged to main, Cloudflare Pages rebuilds the site automatically and the post goes live — no manual deploy step.