Write content with MDX, supporting embedding custom components in Markdown
next-mdx-blog — Next.js Blog Template
By dannyrmc
A local blog template based on Next.js, MDX, Tailwind CSS, and TypeScript, with content stored as .mdx files in the _posts directory, suited to writers who want to control design and content themselves.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 3
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Built-in MDX components such as Image, Callout, Highlighter, InlineCode, and code blocks
Provides dark mode and dynamic image loading blur effect
Automatically calculates blog post reading time
Shadcn/ui is initialized; the README notes that custom typography prose is still in progress
Content files are centralized in the /_posts directory; adding a new post only requires adding an .mdx file
Template Details
This template keeps blog content and page implementation in the same Next.js project. The README states it is built with Next.js, Tailwind CSS, MDX, and TypeScript, and is a locally hosted blog template. Content is stored as .mdx files in the /_posts directory; adding a new post only requires adding an .mdx file, with filenames required to be all lowercase and use hyphens instead of spaces. In addition to standard Markdown syntax, the template includes preset MDX components such as Image, Callout, Highlighter, InlineCode, and code blocks. Image supports optional caption and border attributes, and code blocks can specify a language via the language identifier after the first line's backticks; using text avoids code formatting. For features, the README lists MDX, dark mode, customizable MDX components, formatted code blocks, dynamic image loading blur effect, blog post reading time calculation, initialized Shadcn/ui, and custom typography prose that is still in progress. The README does not describe capabilities such as a content management backend, comments, search, RSS, pagination, multilingual support, or deployment platform support, nor does it provide deployment steps beyond running locally.
Is it right for your project?
Use Cases
- Run and maintain a personal blog locally, with content managed as .mdx files
- Use preset components such as Image, Callout, and Highlighter in Markdown articles to enhance typography
- Specify a language for code examples and display formatted code blocks
- Blog projects where you want to adjust Tailwind CSS styles and MDX component implementations yourself
Suitable For
- Developers or writers who want full control over blog design and content
- Frontend users familiar with Next.js, TypeScript, and MDX workflows
- Personal blogs that need locally hosted, file-based article content management
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Node and npm must be installed in advance
- 2
Run npm install in the project root to install dependencies from package.json
- 3
Run npm run dev to start the development server
- 4
Visit http://localhost:3000 in a browser to view the local site
- 5
When adding a new post, add an .mdx file in the /_posts directory; the filename must be all lowercase and use hyphens instead of spaces
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in a public repository; the free scope is the code of that version and does not mean external services or third-party assets are free.
Must comply with when using
- Free use, modification, commercial use, and distribution of this version's code are permitted.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur separate charges.
- When adding a new post, the filename must be all lowercase and use hyphens instead of spaces, otherwise it does not meet the template's requirements.
- If you want a code block not to be formatted, you need to change the language identifier to text.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
> The filename must be lowercase and use dashes instead of spaces.
Original README
https://github.com/dannyrmc/next-mdx-blog/blob/main/LICENSEhttps://github.com/dannyrmc/next-mdx-blog/blob/main/README.mdTo escape the code formatting, change the language to `text`.
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-14. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 80 / 100
- Technologies
- Next.js · React
- Website type
- Blog
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-01-27
- Screenshot last checked
- 2026-10-14
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Review declaration: codex-user-requested-batch-review-20261017 · 2026-10-16
Inspect the recorded source material
SHA-256: 678a8facf6b7ea581b0ab290be5773b4abedba6f756f54f48da44f13295bc403
2026-10-14T10:00:24.812Z
Source file / repository# MDX and Next.js Blog Template

Crafted blog template built using Next.js, Tailwind CSS, MDX, and TypeScript. This locally hosted blog is for those who want full control of the design and content.
## Features
- MDX (Extended Markdown)
- Dark Mode
- Customizable MDX components
- Formatted code block
- Loading blur for dynamic images
- Calculated blog post reading time
- Shadcn/ui initiated
- Custom typography prose (in progress)
## Performance
As of this writing, Blog has achieved a 100% Lighthouse score.
---
## Install & Run
1. Make sure you have `node` and `npm` installed.
2. Install dependencies from [/package.json](/package.json):
```bash
npm install
```
3. Start the dev server:
```bash
npm run dev
```
4. View app locally in the browser
```bash
http://localhost:3000
```
## Add Content
The MDX content is located in the [/\_posts](/_posts) directory. This is where you can add or modify content.
Just add a new file with the extension of `.mdx`
For example, `first-post.mdx`
> [!IMPORTANT]
> The filename must be lowercase and use dashes instead of spaces.
```bash
🚫 filename with spaces.mdx
```
```bash
✅ filename-with-dashes.mdx
```
---
## Using MDX Components

In addition to standard Markdown features, Blog comes with a few predefined MDX components.
### Image Component
```markdown
<Image
src="/images/placeholder.webp"
alt="Description of image"
/>
```
You can also add an optional `caption` and/or `border`.
```markdown
<Image
src="/images/sample.webp"
alt="Description of image"
caption="Image caption"
border
/>
```
### Callout Component
```markdown
<Callout emoji="💡">
This is a callout component with an emoji
</Callout>
```
### Highlighter Component
```markdown
<Highlighter>
Highlighted sentence.
</Highlighter>
```
### Inline Code Component
```markdown
<InlineCode>
node
</InlineCode>
```
### Code Block Component
Similar to Markdown, code blocks are formatted by surrounding the code with backtick marks.
You can also specify the coding language after the first 3 backtick marks.
````markdown
```javascript
const Category = (props) => {
return (
<div className="rounded-3xl border p-2">
<p className="text-sm font-bold uppercase leading-3 tracking-widest">
{props.category_label}
</p>
</div>
);
};
export default Category;
```
````
To escape the code formatting, change the language to `text`.
````bash
```text
filename_1.jpg
filename_2.jpg
filename_3.jpg
```
````
---
## License
This project is licensed under the [MIT License](/LICENSE).
Explore similar templates
Compare previews and descriptions within the same stack and category.

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

Nextjs-tailwindcss-blog-template
A Next.js blog styled with Tailwind CSS. The current branch processes Markdown with Velite; the earlier Contentlayer setup is retained in a separate historical branch.
Next.js · Blog

Next-js-Blog-Boilerplate
A blog starter built on Next.js 12 and Tailwind CSS 3, integrating TypeScript, ESLint, Prettier, and PostCSS.
Next.js · Blog

nextjs-blog-theme
A Next.js 15 and Tailwind CSS 4.x blog starter by Netlify, designed by Bejamas, with MDX support, dark/light theme switching, and environment-variable configuration. It includes a visual setup wizard for deploying to Netlify and manages content via local .mdx files.
Next.js · Blog

blog
A personal blog forked from Timlrx's tailwind-nextjs-starter-blog, built with Next.js, React, and Tailwind CSS. Content is stored as Markdown/MDX under data/, with site, author, navigation, and project data in separate files.
Next.js · Blog

tailnext
Tailnext is a free, open-source template built on the Next.js 14 App Router and Tailwind CSS, created by the onWidget team.
Next.js · Blog
