# Nextra — card for AI agents

Next.js-based framework for docs sites and blogs with a ready docs theme and a starter template repo.

Category: Page and site templates · maker Shu Ding / The Guild · checked 2026-11-09 · style: minimal

## Price
- Price: Free
- Free tier: Fully free.

## License
MIT — https://github.com/shuding/nextra/blob/main/LICENSE

- commercial: **yes** (Commercial use OK)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/shuding/nextra/main/LICENSE)
- attribution: **no** (No credit needed)
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  (https://raw.githubusercontent.com/shuding/nextra/main/LICENSE)
- in app: **yes** (Can ship inside your app)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/shuding/nextra/main/LICENSE)
- redistribute: **yes** (Can pass the files on to your own users)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/shuding/nextra/main/LICENSE)

## Rules to follow
- Keep the MIT copyright notice in the code if you redistribute it.
- No visible credit on the site is required by the licence.

## Can an AI agent use it by itself?
**Yes** · package: Agent installs a package or loads it from a CDN

## How an agent gets files
- npm i nextra nextra-theme-docs (Nextra 4.6.1 needs Next.js 14 or later, per its npm peer dependencies); setup guide at nextra.site. No account. (sign-in: none)
- Formats: mdx, tsx
- Not allowed: Needs Node.js

## How to connect
- Package (npm/PyPI)
- npm: `npm install nextra`
- Repository: https://github.com/shuding/nextra
- Website: https://nextra.site

## Numbers (AgentGid data)
- Gid Score: 49
- GitHub stars: 13,958
- Downloads last week: 294,642

## Lines to paste into your prompt or AGENTS.md

```
- Nextra (Page and site templates). Next.js-based framework for docs sites and blogs with a ready docs theme and a starter template repo. Price: free; commercial use OK; no credit needed. Style: minimal.
  Connect: npm nextra.
  Get files: npm i nextra nextra-theme-docs (Nextra 4.6.1 needs Next.js 14 or later, per its npm peer dependencies); setup guide at nextra.site. No account (mdx, tsx).
  Not allowed: Needs Node.js
  Rule: Keep the MIT copyright notice in the code if you redistribute it.
  Rule: No visible credit on the site is required by the licence.
  License: https://github.com/shuding/nextra/blob/main/LICENSE (checked 2026-11-09; details: https://agentgid.com/assets/nextra/)
```

## Links
- AgentGid page: https://agentgid.com/assets/nextra/
- Is it free for commercial use? https://agentgid.com/assets/nextra/commercial-use/
- Source: https://nextra.site
- Source: https://github.com/shuding/nextra
- Source: https://raw.githubusercontent.com/shuding/nextra-docs-template/main/LICENSE


## Nextra: docs sites and blogs from Markdown

Nextra is a free tool that turns a folder of Markdown text files into a finished documentation site or blog. It adds the menu, sidebar, search, dark mode and table of contents for you. It runs on Next.js, so you or your AI assistant need a Next.js project to use it.

### Where to use it
- Documentation for a product: Write help pages for your app, library or service as Markdown files and get a site with a sidebar, search and a table of contents on each page.
- A blog for a project or company: Publish posts written in Markdown with the separate blog theme, which also has pages for tags and a feed.
- Search across all pages: Readers can search every page of your docs right in the browser. The search index is made while the site is built, so no search server is needed.
- Docs in several languages: Keep an English, German and Japanese copy of each page in folders per language; the site gets a language switch.
- Docs on simple static hosting: Build the whole site as plain files and put it on GitHub Pages or any web server, without running a Node server.
- Help center for a small app: Turn your support answers into a searchable help site with step-by-step pages, tabs and notes, kept next to your app's code. (idea, not from the official pages)

### How to start
- In a project folder, install Next.js, React, Nextra and the docs theme.

```
npm i next react react-dom nextra nextra-theme-docs
```

- Add next.config.mjs with the nextra wrapper, an mdx-components file and app/layout.jsx as shown in the guide, then run the site.

```
npm run dev
```

- Write pages as .mdx files in the content folder (for example content/index.mdx).

### License
MIT license: free for personal and paid sites, no visible credit needed. If you pass on copies of the Nextra code, keep its copyright and license notice.

### Good to know
- Nextra 4 works only with the newer Next.js App Router. Projects on the older Pages Router need Nextra 3 or earlier.
- Pages are written in MDX, a kind of Markdown where you can also place interactive parts, like a counter or a code playground.
- Nextra follows the system settings for more contrast and less motion.
- The latest version is 4.6.1, from December 2025. It needs Next.js 14 or newer, React 18 or newer and Node 18 or newer.

Checked 2026-11-09 against: https://nextra.site, https://nextra.site/docs, https://nextra.site/docs/docs-theme/start, https://nextra.site/docs/blog-theme/start, https://nextra.site/docs/guide/search, https://nextra.site/docs/guide/i18n, https://nextra.site/docs/guide/static-exports, https://nextra.site/docs/guide/markdown, https://nextra.site/docs/file-conventions/meta-file, https://nextra.site/docs/file-conventions/content-directory, https://github.com/shuding/nextra, https://github.com/shuding/nextra/blob/main/README.md, https://github.com/shuding/nextra/blob/main/LICENSE, https://github.com/shuding/nextra/blob/main/examples/docs/package.json, https://github.com/shuding/nextra-docs-template, https://github.com/shuding/nextra-docs-template/blob/main/README.md, https://github.com/shuding/nextra-docs-template/blob/main/package.json, https://raw.githubusercontent.com/shuding/nextra-docs-template/main/LICENSE, https://registry.npmjs.org/nextra, https://registry.npmjs.org/nextra-theme-docs, https://registry.npmjs.org/nextra-theme-blog

### Mistakes to avoid
- Don't: Cloning shuding/nextra-docs-template and running pnpm i → Do: Follow the Docs Theme guide on nextra.site (or copy examples/docs from the nextra repository) and pin nextra and nextra-theme-docs to 4.6.1 (The template asks for Next.js 13 and nextra "latest", which now installs Nextra 4, and that needs Next.js 14 or newer.)
- Don't: Adding Nextra 4 to a site built with the pages/ folder (Pages Router), or following Nextra 2 or 3 guides with theme.config.jsx → Do: Use the App Router with app/layout.jsx and a content folder, or stay on Nextra 3 for the Pages Router (Nextra 4 dropped Pages Router support.)
- Don't: Expecting search to work after next build alone → Do: Install pagefind and add the postbuild script that indexes .next/server/app (output to public/_pagefind, or out/_pagefind for a static export) (Search reads an index made from the built HTML, so it must run after the build.)
- Don't: output: 'export' without images: { unoptimized: true } → Do: Set images.unoptimized to true in next.config.mjs for a static export (The guide marks it as mandatory, otherwise the export fails.)
- Don't: Relying on automatic language redirects on a statically exported multilingual site → Do: Use a server build for the redirect, or link the language versions by hand (The redirect proxy does not work with output 'export'.)

### Questions
- Do I need to know Next.js? A little. Nextra is a plugin for Next.js, so you need a Next.js project; the pages themselves are Markdown files.
- Does search need a server or a paid service? No. Pagefind builds the search index after the site is built, and the search runs in the reader's browser.
- Can I host it as plain files, for example on GitHub Pages? Yes, with a static export (output 'export' and unoptimized images in next.config.mjs).
- Can I use it for a blog instead of docs? Yes. Install nextra-theme-blog instead of nextra-theme-docs.
- Is it free for a company site? Yes. It is MIT licensed.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
