A minimalist blog template built with Next.js, MDX, and Tailwind CSS. Write posts in MDX, get server components, view transitions, and dark mode out of the box.
- Next.js 15 — App Router with React 19 Server Components
- MDX Blog — Write posts in Markdown with JSX components
- Tailwind CSS 4 — Utility-first styling with dark mode
- View Transitions — Smooth page transitions via the View Transitions API
- Animations — Motion library integration
- SEO Optimised — Meta tags, Open Graph, structured data
- Accessible — Built on Radix UI primitives (shadcn/ui)
- Code Highlighting — Shiki for syntax highlighting
- Developer Ready — TypeScript, ESLint, Prettier, Husky
git clone https://github.com/loke-dev/nextjs-mdx-blog-template my-website
cd my-website
pnpm install
pnpm devOpen http://localhost:3000 in your browser.
Requires Node.js v20+ and pnpm v8+.
src/
├── app/ # App router pages
├── components/ # React components
│ ├── mdx/ # MDX-specific components
│ └── ui/ # UI components (shadcn)
├── lib/ # Utility functions
├── posts/ # MDX blog posts
├── styles/ # Global styles
└── types/ # TypeScript types
Add MDX files to src/posts/:
---
title: My New Post
date: 2024-03-25
description: A description of my new post
---
# My New Post
This is the content of my post written in MDX.- Update site metadata in
src/app/layout.tsx - Modify the theme in
src/styles/globals.css - Add or modify components in
src/components/ - Update pages in
src/app/
Works on any platform that supports Next.js.
MIT