← Back to articles

Building This Blog with Next.js

I recently rebuilt my personal site using Next.js, and I wanted to share a few notes on the setup.

The Stack

  • Next.js 16 with App Router
  • TypeScript for type safety
  • Tailwind CSS for styling
  • MDX for content

Why MDX?

For a developer blog, MDX is the obvious choice. Your content lives in version control alongside your code. No external CMS to manage, no API calls to fetch content.

Here's an example of how simple the workflow is:

---
title: "My Article"
date: "2026-01-23"
---

Just write Markdown. Add code blocks, images, whatever you need.

The frontmatter gives you metadata. The content is just Markdown. Easy.

Key Files

The interesting bits are in src/lib/articles.ts which handles:

  • Reading MDX files from the content/articles directory
  • Parsing frontmatter with gray-matter
  • Sorting articles by date

And src/app/articles/[slug]/page.tsx which renders individual articles using next-mdx-remote.

Deployment

I deploy to Vercel. Push to main, and it's live in seconds. Can't beat that developer experience.

What's Next

I'm keeping this simple for now. Future improvements might include:

  • RSS feed
  • Syntax highlighting for code blocks
  • Dark mode
  • Search

But for now, it works. Ship it.