Skip to Content
These docs are a work in progress — pages may change without notice.
Page template

Page template

To start a new page:

  1. cp content/template.mdx content/my-page.mdx
  2. Edit the front matter at the top — title sets the sidebar label and browser title, description sets the meta description.
  3. Delete the sections below that you don’t need.
  4. Add 'my-page' to the _meta.ts in the same folder to place it in the sidebar.

Use .mdx for pages with components, .md for plain Markdown. The rest of this page shows what is available.

Headings become the table of contents

## and ### headings appear in the “On This Page” panel on the right. Keep to one # per page.

A third-level heading

Regular paragraphs, bold, italic, inline code, and links . Prefer absolute links to other docs pages (/some/page) so they survive a file move.

Callouts

Neutral note.
Something worth knowing.
Something that will bite you.
Something destructive — read before running.

Code blocks

Give every block a language. Optionally add a file name and highlight lines:

example.ts
const job = await getJob(jobId) await job.run() // this line is highlighted
npm run dev

Steps

Do the first thing

Headings inside <Steps> are numbered automatically.

Then the second

Each heading advances the counter.

Tabs

npm install

Tables

ColumnMeaning
fooWhat foo is for
barWhat bar is for

Lists

  • A bullet
  • Another bullet
    • A nested one
  1. A numbered step
  2. The next one

Cards

File tree

    • _meta.ts
    • index.mdx

Images

Put images in public/ and reference them from the site root, e.g. ![Alt text](/my-diagram.png).

Other components

Bleed, Mermaid, ImageZoom, Collapse and Playground are also available from nextra/components. See the Nextra component reference .

To use a component on every page without importing it, register it in mdx-components.tsx at the repo root.