Hello World
metanextjs
This is the first post on the new blog. It's built with Next.js and MDX, which means I can mix markdown with React components.
Why MDX?
MDX lets me write content in markdown while embedding interactive components when I need them. It's a good fit for a technical blog that might eventually include demos and tools.
Code example
Here's a quick TypeScript snippet to show off syntax highlighting:
interface Post {
slug: string;
title: string;
date: string;
tags: string[];
}
function getLatestPosts(posts: Post[], count: number): Post[] {
return posts
.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
.slice(0, count);
}Inline code works too: const x = 42.
This is a custom callout component rendered inside MDX. Useful for tips, warnings, or asides.
What's next
More posts, more tools. Stay tuned.