Hello, visualizations
A test post for the new blog: interactive charts, diagrams, math, and highlighted code, all from a single MDX file.
This is a test post for the blog. Posts live in content/blog/ as MDX, so they're plain
Markdown plus any React component I register. Everything below renders from that one file.
Math
Inline math works like , and display math gets its own block:
The gradient descent update used in the playground further down is
Code
Code blocks are highlighted at build time with Shiki, follow the light/dark toggle, and support titles and highlighted lines:
export function descend(grad: (x: number) => number, x0: number, lr: number, steps = 50) {
const path = [x0]
for (let i = 0; i < steps; i++) {
const x = path[path.length - 1]
path.push(x - lr * grad(x))
}
return path
}Charts
A line chart with hover crosshair, direct end labels, a legend, and a table view (try the Show table button):
p95 latency by context length
Synthetic benchmark, milliseconds, lower is better
- Baseline
- Prompt cache
- Int8 + cache
A single-series area chart, which needs no legend because the title names the series:
Weekly build minutes
Synthetic CI usage over 12 weeks
A sorted bar chart with values at the bar tips and hover details:
Where an agent run spends its time
Synthetic breakdown of a 40s run, seconds
Diagrams
Mermaid diagrams render client-side and re-theme with the toggle:
Interactive components
Any React component can be embedded. Here's a gradient descent playground. With a small learning
rate it rolls into whichever valley it starts in. Push the rate up and it starts overshooting,
and somewhere past 0.8 it diverges entirely:
Gradient descent playground
Pick a learning rate and starting point, then step through the updates x ← x − η·f′(x).
Images
Images are plain Markdown. Put the file in public/blog/<post-slug>/ and link it from the root.
The optional quoted title becomes the caption:

They're resized for each screen, served as AVIF or WebP, and lazy-loaded. The size is read from the file at build time, so the page doesn't jump around as images load. A typo in the path fails the build rather than shipping a broken image.
Put images on consecutive lines, with no blank line between them, and they sit side by side:


For a caption with formatting, use the component:

<Figure />, with a rich caption.Everything else
Standard Markdown and GFM still work: bold, italic, strikethrough,
links, and tables:
| Feature | How |
|---|---|
| Math | $...$ and $$...$$ (KaTeX) |
| Code | Fenced blocks (Shiki) |
| Charts | <LineChart />, <BarChart /> |
| Diagrams | <Mermaid chart={...} /> |
| Images |  |
| Custom widgets | Any registered component |
To write a new post, drop an
.mdxfile incontent/blog/withtitle,date,summary, andtagsfrontmatter. Adddraft: trueto hide it in production.