| name | moai-library-nextra |
| description | Enterprise Nextra documentation framework with Next.js. Use when building documentation sites, knowledge bases, or API reference documentation.
|
| license | Apache-2.0 |
| compatibility | Designed for Claude Code |
| allowed-tools | Read Write Edit Grep Glob mcp__context7__resolve-library-id mcp__context7__get-library-docs |
| user-invocable | false |
| metadata | {"version":"2.2.0","category":"library","modularized":"true","status":"active","updated":"2026-01-11","tags":"library, nextra, nextjs, documentation, mdx, static-site","aliases":"moai-library-nextra"} |
| triggers | {"keywords":["documentation","nextra","docs site","knowledge base","api reference","mdx","static site"]} |
Quick Reference
Purpose: Build professional documentation sites with Nextra and Next.js.
Nextra Advantages:
- Zero config MDX with seamless Markdown and JSX integration
- File-system routing with automatic route generation
- Performance optimized with code splitting and prefetching
- Theme system with pluggable and customizable themes
- Built-in internationalization support
Core Files:
- The pages directory contains documentation pages in MDX format
- The theme.config.tsx file contains site configuration
- The _meta.js files control navigation structure
Implementation Guide
Features
This skill covers Nextra 3.x and 4.x documentation framework architecture patterns, Next.js 14 and 15 integration with optimal configuration, theme customization via theme.config.tsx or Layout props, advanced search with FlexSearch integration, internationalization support, MDX-powered content with React components, and App Router support in Nextra 4.x with Turbopack compatibility.
When to Use
Use this skill when building documentation sites with modern React features, creating knowledge bases with advanced search capabilities, developing multi-language documentation portals, implementing custom documentation themes, or integrating interactive examples in technical docs.
Project Setup
To initialize a Nextra documentation site, use the create-nextra-app command with npx specifying the docs template. The resulting project structure includes a pages directory containing the custom App component file, the index MDX file for the home page, and subdirectories for documentation sections. Each section contains MDX files for content and a _meta.json file for navigation configuration.
Theme Configuration
The theme.config.tsx file exports a configuration object with several key properties. The logo property defines the site branding element. The project property contains a link to the project repository. The docsRepositoryBase property specifies the base URL for the edit link feature. The useNextSeoProps function returns SEO configuration including the title template.
Essential configuration options include branding settings for logo and logoLink, navigation settings for project links and repository base URLs, sidebar settings for default collapse level and toggle button visibility, table of contents settings including the back-to-top feature, and footer settings for custom footer text.
Navigation Structure
The _meta.js files control sidebar menu ordering and display names. Each file exports a default object where keys represent file or directory names and values represent display labels. Special entries include separator lines using triple dashes as keys with empty string values, and external links can be configured with nested objects containing title, href, and newWindow properties.