The writing kitchen sink
Every element a post can use, in one place
This post exists to be looked at. It uses every element a post on this site can contain, so I can check how each one reads on a phone and on a desktop, and so I have a reference to copy from when I sit down to write something real. When the first real post goes out, this one goes away.
The posts are plain files in the repository. I write them in a text editor, preview them locally, and publish them by deploying. There is no admin page for writing, and I don't miss one.
Why files#
A post is something I edit over days, not minutes. Keeping it as a file means I get history, drafts on branches and a preview of every change for free, from tools I already use.1Every change to a post is a commit, so nothing I write is ever lost, and an old version is one command away.
The other option was a writing page in the browser. That would have meant building an editor, previews for every component and a way to save back to the repository. That is a lot of code to write something I can already write.2I did sketch one. It needed an editor, a preview for every component and a way to save commits, before writing a single word.
How a post is built#
A post is one file, and adding one needs no change to the code around it. The build finds it, checks it and turns it into a page.
The file name#
The name of the file carries the date and the address. This one is called 2026-11-27-the-writing-kitchen-sink.mdx, so it is dated 27 November 2026 and lives at /posts/the-writing-kitchen-sink. Only lowercase letters, digits and single hyphens are allowed in the address, which keeps links readable and the same everywhere they are pasted.
The frontmatter#
Each file starts with a few lines of frontmatter: the title, an optional subtitle and description, and flags for drafts and the table of contents. The build checks those lines, the file name and every media path, and stops if anything is wrong, so a typo never reaches the live site.3A post marked as a draft builds on my machine and in the test builds, but never on the live site.
Words on the page#
Type, spacing and the small things#
The body text is a serif at 19 pixels, which is large enough to read for a long time without leaning in. Links look like this one to the photostream, underlined just enough to find, and bold text is a little darker rather than a lot heavier.
A heading that comes straight after a bigger one, like the line under "Words on the page", reads as its subtitle.4This note is long on purpose, to check that the preview stops after ten lines instead of growing to cover the page. Footnotes are where I put the asides that would break the flow of a paragraph: the detail that is true but not important, the story behind a decision, the caveat that only matters to some readers. Most of them are a sentence or two. Now and then one runs on, like this one, and the full text is always in the list at the end of the post, where the back link returns you to where you were reading. The preview only needs to give the gist, so a short excerpt is enough, and anything longer than ten lines is cut off with an ellipsis. Further down there are smaller headings for the times a section needs parts.
Lists are for things that really are lists:
- short items, one idea each
- in the order a reader needs them
- and now and then a nested point
- never a paragraph broken into pieces
When the order matters, they are numbered:
- Write the post as a file.
- Run it locally and read it on a phone.
- Push a branch and check the preview.
A quote stands apart from the text around it. It stays upright, a little heavier, with a bar on its left, so it reads as someone else's words without shouting.
A fourth-level heading#
Sections rarely go this deep, but when they do, the headings keep shrinking in steps so the structure stays clear.
A fifth-level heading#
Smaller again.
A sixth-level heading#
The smallest one, mostly here to prove it exists.
A rule like the one above marks a change of subject without needing a new heading.
Photos and video#
Most of what I write will have photos in it, so they get the same care here as on the rest of the site. A single image is plain Markdown, like the one above.
Photosets#
Several photos that belong together go in a photoset, laid out in justified rows:
Carousels and video#
A longer sequence works better as a carousel you can swipe through:
And a clip with sound gets the full video player:
Every photo and video opens in the viewer, where you can see it larger and step through the others in its group.
Embedded video#
Videos that live on YouTube show a poster first. The player, and everything YouTube loads with it, only arrives when you press play, and then from its privacy-enhanced address:
Notes#
Photos have to be uploaded before a post can use them. The upload script puts them in the media bucket and writes down their sizes, and the build refuses a post that points at a photo it has never seen. It is a small rule, and it has already saved me from a broken page.5The upload script also makes the smaller sizes the pages ask for, so a phone never downloads a full-size photo.
Reading on different screens#
Most people will read this on a phone, so that is where I check a post first. The text column gets narrower, photos run to the edges of the screen, and anything wide scrolls inside its own box rather than pushing the page sideways.
On a desktop#
A wide screen has room to spare, and some photos use it. This one is wider than the text column:
On a desktop a long post also gets a small map of its headings at the right edge of the window. It appears once the table of contents near the top has scrolled away, shows where you are in the post, and takes you to any section with one click.
On a phone#
On a phone that map stays hidden, because there is no room for it and no pointer to hover with. The table of contents near the top does the same job, and the browser's own scrolling does the rest.
Boxes and tables#
Some things need to stand apart from the text. A callout is for the aside a reader should not miss:
A standout pairs a photo with a few words, for when a picture needs a short note beside it rather than a caption under it:
A square photo
Square crops sit well next to text. This one is a test pattern, standing in for a photo I have not taken yet.
Tables are for numbers you want to compare side by side. This one is wider than a phone on purpose, so it scrolls sideways inside its own box while the page stays put:
| Lens | Focal length | Widest aperture | Weight | Filter thread | Close focus | Year |
|---|---|---|---|---|---|---|
| Wide prime | 28 mm | f/2 | 180 g | 39 mm | 0.7 m | 2016 |
| Standard prime | 50 mm | f/1.4 | 230 g | 46 mm | 0.7 m | 2004 |
| Short telephoto | 90 mm | f/2 | 475 g | 55 mm | 1.0 m | 2010 |
Code#
Now and then a post needs a bit of code. Short names inside a sentence, like npm run build or a file such as content/posts/, get a tinted chip. Longer pieces get a block of their own, highlighted when the site is built, so the colors are there before any script runs.
This is the function that turns a file name into a date and a slug. The lines that do the actual work are marked:
const FILE_PATTERN = /^(\d{4})-(\d{2})-(\d{2})-(.+)\.mdx$/
export function parsePostFileName(fileName: string) {
// "2026-11-27-the-writing-kitchen-sink.mdx"
const match = FILE_PATTERN.exec(fileName)
if (!match) throw new Error(`${fileName}: expected YYYY-MM-DD-slug.mdx`)
const date = `${match[1]}-${match[2]}-${match[3]}`
const slug = match[4]
return { date, slug }
}
Publishing is a couple of commands:
npm run media:upload -- ~/Pictures/winter 2026/winter
npm run dev
And anything the highlighter does not know comes through as plain text:
Title: The writing kitchen sink
Published: 27 November 2026
Words: about fifteen hundred
What comes next#
The rest of this post fills in as the writing features land: tables, code, footnotes and embeds.
Notes#
Two sections here share the title "Notes" on purpose. Each heading still gets its own address, so a link to the second one lands here and not on the first.
Footnotes
-
Every change to a post is a commit, so nothing I write is ever lost, and an old version is one command away. ↩
-
I did sketch one. It needed an editor, a preview for every component and a way to save commits, before writing a single word. ↩
-
A post marked as a draft builds on my machine and in the test builds, but never on the live site. ↩
-
This note is long on purpose, to check that the preview stops after ten lines instead of growing to cover the page. Footnotes are where I put the asides that would break the flow of a paragraph: the detail that is true but not important, the story behind a decision, the caveat that only matters to some readers. Most of them are a sentence or two. Now and then one runs on, like this one, and the full text is always in the list at the end of the post, where the back link returns you to where you were reading. The preview only needs to give the gist, so a short excerpt is enough, and anything longer than ten lines is cut off with an ellipsis. ↩
-
The upload script also makes the smaller sizes the pages ask for, so a phone never downloads a full-size photo. ↩