Nextra is a framework built on top of Next.js that turns your MDX files into a fast, polished website. Whether you’re building documentation, a blog, or a fully custom content site, Nextra gives you file-system routing, a powerful theme system, and built-in components — all without leaving the Next.js ecosystem.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shuding/nextra/llms.txt
Use this file to discover all available pages before exploring further.
Docs Theme
Build a full documentation site with sidebar, TOC, and search in minutes.
Blog Theme
Launch a blog with tags, RSS feed, and post navigation out of the box.
Custom Theme
Build a completely bespoke layout using Nextra’s low-level primitives.
API Reference
Explore the full configuration API and all exported utilities.
What is Nextra?
Nextra wraps Next.js as a webpack/Turbopack plugin and adds:- MDX support — Every
.mdand.mdxfile in yourcontent/directory orapp/router is compiled to a React component. Use React components, hooks, and imports directly inside your Markdown. - File-system routing — Your file structure becomes your site structure. Organize with
_meta.jsfiles to control sidebar order, titles, and visibility. - Themes — Ship a docs site (
nextra-theme-docs) or blog (nextra-theme-blog) with a single import, or write your own theme. - Built-in components —
<Callout>,<Cards>,<Tabs>,<Steps>,<FileTree>,<Banner>, and more — all designed to work seamlessly in MDX. - Syntax highlighting — Powered by Shiki at build time, with line highlighting, copy buttons, and inline code highlighting.
- Search — Static full-text search via Pagefind — no server required.
- i18n — First-class internationalization using Next.js’s built-in i18n routing.
Quick start
Choose your path based on what you’re building:import nextra from 'nextra'
const withNextra = nextra({
// Nextra options
})
export default withNextra({
// Next.js options
})
Key features
File Conventions
Learn how to structure
content/, _meta.js, and mdx-components files.Writing Content
MDX, GFM, syntax highlighting, LaTeX, Mermaid diagrams, and more.
Built-In Components
Callouts, Cards, Tabs, Steps, FileTree — ready to use in any MDX file.
Advanced
Tailwind CSS, custom CSS, Turbopack, remote content, static exports.
Requirements
- Node.js 18 or later
- Next.js 14 or later (app router only in Nextra 4)
- React 18 or later
Nextra 4 requires the Next.js app router. If you’re using the pages router, use Nextra 3.x.