All posts

Writing posts in MDX

Nov 6, 2026 · Ada

mdxcontent

Every post on this blog is an MDX file in apps/web/content/blog. MDX is Markdown that can also render React components, so posts get rich formatting without leaving the editor.

Text formatting

You can write bold, italic, strikethrough and inline code, and link to other pages or external sites.

Blockquotes work too. Use them for asides or quotes.

Lists

  1. Create content/blog/<slug>/en.mdx and nl.mdx.
  2. Export a metadata object with a title and excerpt.
  3. Register the post in content/blog/index.ts.
  • Tables, task lists and strikethrough (via remark-gfm)
  • Heading anchors (via rehype-slug): hover a heading to see its link
  • Syntax highlighting (a good next step)

Code

import { lang } from "next/root-params"

export default async function Page() {
	const locale = await lang()
	return <p>Current locale: {locale}</p>
}

Tables

FeaturePluginTurbopack
GFM tablesremark-gfmYes
Heading IDsrehype-slugYes
Custom JSXnone neededYes

Components

Components from mdx-components.tsx are available in every post without an import: