How to set up a Next.js (App Router) SEO blog with MDX
MDX content + Metadata API + JSON-LD + sitemap/robots/RSS + OG images in one repo.
Overview
This repository is a Next.js (App Router) + TypeScript + Tailwind blog.
Posts live in content/{locale}/posts/*.mdx, and posts with draft: true are excluded from lists, sitemap, and RSS.
SEO checklist
generateMetadata()per page- JSON-LD on post pages (BlogPosting + BreadcrumbList)
/sitemap.xml,/robots.txt,/feed.xml/api/og/{locale}/{slug}for automatic OG images
MDX sample
- Link: Next.js App Router\n- Inline code:
generateMetadata()
export function hello(name: string) {
return `hello ${name}`;
}