Skip to Content
Home

next-md-blog

Markdown-first blogging for Next.js . Keep posts as .md / .mdx on disk, load them in Server Components with getBlogPost / getAllBlogPosts, render with MarkdownContent, and ship metadata, JSON-LD, RSS, and sitemap helpers — plus an optional CLI to scaffold routes and config.

Why it’s different

  • Metadata lives in frontmatter — title, date, description, tags, and authors stay in the same file as the article. There is no separate per-post meta file (no post.json next to post.md) and no generated content manifest you have to treat as a second source of truth for simple blogs.
  • Optional site config — one TypeScript module (next-md-blog.config.ts) for defaults and authors, not a parallel metadata tree for every post.
  • App Router–native — fetch posts in RSC route handlers; no extra runtime CMS required for file-based workflows.
  • Small surface area — core library + initializer; you keep control of layouts and styling.

How it fits in your Next.js app

When a reader opens a post, data flows from disk through the core helpers into your page and SEO components:

Idea: your routes stay ordinary Next.js files; the library handles reading, parsing frontmatter, markdown → React, and SEO primitives.

One source of truth per post

Many toolchains introduce extra artifacts: sidecar JSON/YAML, or a generated layer (for example a build step that emits typed documents and a cache directory). next-md-blog keeps the model flat for typical blogs: one markdown file carries both prose and metadata.

You still add one optional blog-wide config file for site URL, default author, and shared author objects — that is not a per-post meta file and stays easy to reason about.

Packages

PackageRole
@next-md-blog/corePosts, rendering, SEO helpers, feeds
@next-md-blog/cliScaffold routes, config, optional OG

Requirements

  • Next.js ^16 and React ^19 (peers of @next-md-blog/core)
  • Node.js 18+

Compared to other options (short)

next-md-blogTypical file-pipeline toolsHeadless CMS
Post metadataFrontmatter in the .md/.mdx fileOften config + generated docs or sidecarsSchema in the CMS
Build stepOptional CLI once; runtime reads filesOften required codegen / cache dirAPI + preview
Best forOwn your markdown in-repoHeavy typing & content graphsEditorial workflows, non-dev authors

See the full Comparison page for stack-by-stack notes.

Where to go next

This documentation site

Published at www.next-md-blog.com . Clone the repository  and run:

pnpm install pnpm dev:docs

Open http://localhost:5101  (see docs/package.json). Production hosting: Deployment.

Live demos: demo.next-md-blog.com  (single locale) · demo.i18n.next-md-blog.com  (i18n).

Deploy on Vercel

Standalone starters (no monorepo clone) — see Demos and Deployment.

Single locale

Deploy with Vercel

i18n

Deploy with Vercel

Last updated on