Writing Posts in MDX
2026-06-15
Every post in src/posts/ is an .mdx file. The block at the top of the
file, between the --- lines, is YAML frontmatter:
---
title: My Post
date: '2026-01-01'
description: A one-line summary
---
The remark-frontmatter and remark-mdx-frontmatter plugins turn that
block into a frontmatter export, which src/lib/posts.ts reads to build
the post list and generate a route for each post.
Below the frontmatter, everything is just Markdown, and you can drop into JSX at any point since MDX compiles to a React component:
This blockquote is plain JSX, right inside the Markdown.
Add a new file here and it shows up on the homepage automatically.