← All posts

Why This Site Is Just MDX Files in Git

I'm building this site to publish referral and review content: the kind of writing where a reader is trusting me to have actually used the thing, and to say so plainly when a link in the post earns me money. That trust is the entire point, so before writing a single review I wanted the plumbing underneath it to be boring and auditable.

That's why every post on this site is a Markdown file (.mdx, to be precise) that lives in this repository, right next to the code that renders it. There's no headless CMS, no database, no admin panel with a "publish" button that quietly changes state somewhere I can't see.

What that buys me

A few things, in order of how much I actually care about them:

  1. A real paper trail. Every post is a Git commit. Every edit is a diff. If I ever go back and soften a criticism after a company sends me a free product, that's visible in the history forever. I want that pressure on myself.
  2. Review before publish. Posts go through the same pull request flow as code. That's a natural place to double check a claim, a disclosure, or an affiliate link before it goes live - not after.
  3. No vendor to lose. A CMS is a dependency with its own outages, pricing changes, and migrations. A folder of Markdown files only depends on this repo existing.
  4. It's honestly just simpler. This site is small. Adding a database for a few dozen posts a year would be solving a problem I don't have.

How it actually works

Posts live in content/posts/*.mdx. Each file starts with frontmatter - title, date, and description - and the filename itself becomes the post's URL slug, so this post lives at /posts/why-this-site-is-just-mdx-files.

At build time, Next.js reads that directory, compiles each file's MDX into a page, and lists everything on /posts, newest first. There's no separate build step to remember to run and no content that exists only in some external system's database - what's in the repo is what's live.

It's a small piece of infrastructure, but it's the piece everything else here depends on. Get this part boring and reliable, and the interesting work - actually writing things worth reading - is what's left.