Engineering

Why we skipped the CMS (for now)

A file-based MDX blog ships faster, costs nothing to run, and keeps content in version control. Here's the reasoning, and when we'd switch.

Adam Ahmed
2 min read
Why we skipped the CMS (for now)
FigureWhy we skipped the CMS (for now)
Share

Most blogs reach for a CMS on day one. We didn't. For a marketing-site blog that a handful of people write for, a content management system is infrastructure you have to run, secure, and pay for before you have published a single post.

The file-based approach

Instead, every post is an MDX file in the repository. Frontmatter carries the metadata; the body is Markdown with the option to drop in React components when a post needs something interactive.

The whole pipeline is a few small pieces:

  • gray-matter parses the frontmatter.
  • A getAllPosts() helper reads the content/blog directory and powers the index, the sitemap, and per-post metadata from one source.
  • next-mdx-remote compiles each post at build time.
export function getAllPosts() {
  return listPostFiles()
    .map((file) => {
      const { slug, frontmatter } = readPostFile(file);
      return { slug, ...frontmatter };
    })
    .sort((a, b) => new Date(b.date) - new Date(a.date));
}

Because posts are static, every page is pre-rendered. There is no database to back up, no admin login to protect, and content review happens in the same pull request as the code.

What you give up

This approach has real trade-offs, and they are worth naming honestly.

CMSFile-based
Non-technical authors can publish without a developerAuthors need to be comfortable editing files and opening pull requests
Live preview before publishingPublishing requires a rebuild and a deployment
Built-in image handling and media libraryImages are managed manually in the repository
Scheduled publishing from a UIScheduling requires a CI/CD integration or a timed deploy

For a team that lives in a code editor, these trade-offs are fine, possibly preferable. For a content or marketing team publishing independently on their own schedule, they become genuine blockers.

When we'd add a CMS

This trade-off holds while the people writing posts are comfortable editing files. The day a non-technical team needs to publish on their own schedule, a CMS earns its keep. The file-based layer we built makes that migration a content export, not a rewrite: the MDX files become the source for a headless CMS import, and the rendering layer stays the same.

Pick the simplest thing that solves today's problem without boxing in tomorrow's.

Until then, we will keep writing in the editor we already have open.

Written by

Adam Ahmed

Co-founder at MTR. Builds custom software, automation and AI tooling for businesses, and writes about the unglamorous decisions that keep systems easy to change.

→ More articles
Start a project

Want software built properly from the start?

We design, build and maintain custom websites, apps and automation — engineered to stay easy to change.

Tell us what you’re building
Keep reading

Contact Us

Tell us what you’re trying to do, what’s getting in the way, or what you’re thinking about building.