Back to blog

Blog post

Why I Switched My Portfolio to MDX

Published Feb 7, 2026

No cover image set for this post.

Article

Why I switched my portfolio to MDX

I wanted one workflow for content-heavy pages.

Instead of hardcoding project details and blog copy in React components, I now keep narrative content in MDX and let routes render by slug.

What changed

  • Blog posts now live in content/blog/*.mdx
  • Project case studies now live in content/projects/*.mdx
  • Each file exports metadata for cards, SEO, and sorting
  • Page routes use that metadata to generate index and detail pages

Why this is better

I can write long-form content with markdown ergonomics, but still use React components when needed.

MDX can render UI components too.