~/ghoerig.dev
ENDE
$ cat hello-world.md

Hello, world

This post exists so there is something in the list while the real writing gets started. Delete it whenever you like.

How posting works

Every file in src/content/writing/en/ becomes an English post, and every file in src/content/writing/de/ a German one. The filename is the URL slug, so src/content/writing/en/hello-world.md is served at /writing/hello-world/.

Posts don’t have to exist in both languages — each listing only shows what’s available in the current one.

The frontmatter block at the top is validated at build time — a missing title or a malformed date fails the build rather than shipping a broken page. The available fields are:

Field Required Notes
title yes Used as the page title and in listings
description yes Shown in listings, meta tags, and RSS
date yes YYYY-MM-DD; controls sort order
draft no true hides it from production builds
tags no A list of strings
translationKey no Ties a post to its counterpart in the other language

Slugs differ between languages (hello-world vs hallo-welt), so translationKey is what lets the language toggle jump between the two versions of the same post.

Drafts

Set draft: true and the post stays visible in npm run dev but is dropped from the production build, the sitemap, and the RSS feed. Flip it to false when it’s ready.

Code

Syntax highlighting is on by default, with separate light and dark themes:

export function greet(name: string): string {
  return `Hello, ${name}`;
}

Use .mdx instead of .md if a post needs components embedded in it.

← back