1 min read

Hello, world

A tour of what this blog can do — copy this file, or run npm run new, to begin an article.

Every post is a Markdown file in src/content/blog/. The file name becomes the URL, so this one lives at /blog/hello-world/.

Starting a post

Run this from the project folder and a draft file is created for you:

npm run new -- "Why our Kafka consumers kept rebalancing"

Drafts (draft: true) are visible while you run npm run dev and are left out of npm run build, so half-written posts never ship by accident.

Frontmatter

Field Required What it does
title yes Page title and list heading
description yes Summary under the title and in list pages
pubDate yes Sort order and the date shown
tags no Topic pages at /tags/<tag>/ and search terms
draft no Hide from production builds
heroImage no Banner image above the post

Code blocks

Fenced code blocks are syntax highlighted in both themes and get a copy button on hover:

def greet(name: str) -> str:
    return f"Hello, {name}"

Inline code

Wrap identifiers in backticks, like consumer.poll().

Everything else

Headings, lists, tables, links, images and blockquotes all work as standard Markdown. Posts with two or more headings get a table of contents on wide screens.

Use a .mdx file instead if you want to embed components inside a post.