Skip to Content

Nextra Documentation Template

A starter template for documentation sites built with Nextra 4  and Next.js 15 .

This template is configured for static export, full-text search via Pagefind, LaTeX math, and the full Nextra docs theme.

What’s Included

  • Static export configuration (output: 'export') for deployment to any static host
  • Pagefind search indexing wired into the build
  • LaTeX rendering via KaTeX
  • A custom <Callout> component alongside Nextra’s built-ins
  • Example content covering every supported component and markdown element — see the Style Guide

Project Structure

src/ ├── app/ │ ├── layout.tsx # Root layout with Nextra theme │ └── [[...slug]]/ │ └── page.tsx # Dynamic page handler ├── components/ │ └── Callout.tsx # Custom callout component ├── content/ │ ├── _meta.js # Sidebar configuration │ ├── index.mdx # This page │ └── styleguide.mdx # Component & element reference └── mdx-components.tsx # MDX component registration

Adding Pages

  1. Create a new .mdx file in src/content/
  2. Add an entry to src/content/_meta.js to control sidebar order and title
  3. Write your content using any of the components shown in the Style Guide

Running Locally

npm install npm run dev

Open http://localhost:3000 .

Building

npm run build

The static site is written to out/ with a Pagefind index at out/_pagefind/.

Last updated on