@next-md-blog/core
v1.0.7
Published
A React library for parsing and displaying markdown blog posts in Next.js
Maintainers
Readme
@next-md-blog/core
Next.js App Router–first helpers for Markdown / MDX posts on disk: MarkdownContent, generateBlogPostMetadata, JSON-LD (including richer Organization publisher data), RSS, and SEO via metadata file conventions — use app/sitemap.ts / app/robots.ts / optional feed.xml with @next-md-blog/core/next (getBlogSitemap, getBlogRobots, createRssFeedResponse).
Install
npm install @next-md-blog/corePeers: next@^16, react@^19, react-dom@^19.
Documentation
- Published docs: https://www.next-md-blog.com
- Live demos: demo.next-md-blog.com (single locale) · demo.i18n.next-md-blog.com (i18n)
- Vercel: single locale
· i18n
- Source & issues: github.com/next-md-blog/next-md-blog
To build the docs locally:
git clone https://github.com/next-md-blog/next-md-blog.git
cd next-md-blog
pnpm install && pnpm dev:docsThen open http://localhost:5101.
Entry points in the repo: Home / overview, API reference.
Quick usage
import {
getBlogPost,
getAllBlogPosts,
MarkdownContent,
createConfig,
generateBlogPostMetadata,
} from '@next-md-blog/core';
import blogConfig from '@/next-md-blog.config';
const post = await getBlogPost('hello', { config: blogConfig });Scaffold routes, sitemap.ts, robots.ts, and config with npx @next-md-blog/cli.
app/sitemap.ts / app/robots.ts
import { getAllBlogPosts } from '@next-md-blog/core';
import { getBlogSitemap, getBlogRobots } from '@next-md-blog/core/next';
import blogConfig from '@/next-md-blog.config';
export default async function sitemap() {
const posts = await getAllBlogPosts({ config: blogConfig });
return getBlogSitemap(posts, blogConfig);
}import { getBlogRobots } from '@next-md-blog/core/next';
import blogConfig from '@/next-md-blog.config';
export default function robots() {
return getBlogRobots(blogConfig);
}Links
- npm
- Issues
- Source:
packages/core
License
MIT
