sswatson / nextra

The Next.js Static Site Generator

Home Page:https://nextra.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nextra

Nextra is a Next.js plugin that renders your MDX files with custom themes.

Development

Installation

The Nextra repository uses PNPM Workspaces and Turborepo. To install dependencies, just simply run pnpm in the project root directory.

Build Nextra Core

cd packages/nextra
pnpm build

Watch mode: yarn dev

Build Nextra Theme

cd packages/nextra-theme-docs
pnpm build

Watch mode: pnpm dev Watch mode (layout only): pnpm dev:layout Watch mode (style only): pnpm dev:tailwind

Development

You can also debug them together with a website locally. For instance, to start examples/docs locally, run

cd examples/docs
pnpm dev

Any change to example/docs will be re-rendered instantly.

If you update the core or theme packages, a rebuild is required. Or you can use the watch mode for both nextra and the theme in separated terminals.

About

The Next.js Static Site Generator

https://nextra.vercel.app

License:MIT License


Languages

Language:TypeScript 92.3%Language:JavaScript 4.6%Language:CSS 3.2%