Thoughts & ideas · · 2 min read
How to write a post on this site
The frontmatter fields, what Markdown you can use, and how drafts work. Delete this file once you have written your own.
By Kundan Kunal
This file is an example. It exists so you can see the format and check that everything renders. Delete it once you have written your first real post.
Creating a post
Add a .md file to content/writing/. The filename becomes the URL, so
building-in-the-open.md is published at /writing/building-in-the-open.
Use lowercase words separated by hyphens.
Every post starts with a frontmatter block between --- lines:
| Field | Required | Notes |
|---|---|---|
title |
yes | Shown as the heading and the page title |
excerpt |
yes | One or two sentences, used in listings and link previews |
topic |
yes | One of the ids in src/content/topics.ts |
date |
yes | YYYY-MM-DD |
draft |
no | true hides the post everywhere |
If a required field is missing, or the topic is not one you have declared, the build fails with a message naming the file — the post never silently vanishes.
What you can write
Normal paragraphs need no markup. You get italic, bold, inline code
and links.
Lists
- Bullet lists
- Work as expected
- Including nested items
- Numbered lists
- Also work
Quotes and code
A blockquote, for when you are citing something or want a line to stand on its own.
// Fenced code blocks keep their formatting.
const words = content.trim().split(/\s+/).length;
A --- on its own line draws a horizontal rule, like the one above.
Drafts
Set draft: true in the frontmatter and the post disappears from the writing
index, the topic pages, the sitemap and its own URL — but stays in the repo so
you can keep working on it.
Adding a new domain
To write in a subject that does not exist yet, add it to
src/content/topics.ts first:
{
id: "design",
label: "Design",
description: "What I notice about how things are made.",
}
That one entry creates /topics/design, adds it to the topic lists and makes
topic: design valid in frontmatter.