Add New Doc
This page shows you how to add a new documentation page to Nocturne.
Estimated time: 2 minutes.
Step 1 — Create the Markdown File
Create a new .md file in docs/.
Example: docs/getting-started/deployment.md
---
sidebar_position: 5
sidebar_label: Deployment
title: "Deployment — Publish Your Nocturne Site"
description: "Deploy your Nocturne documentation to production."
---
# Deployment
Content goes here.
Step 2 — Add Frontmatter
Every doc needs frontmatter at the top:
| Field | Required | Purpose |
|---|---|---|
sidebar_position | No | Number — order within a category |
sidebar_label | No | Short name in the sidebar |
title | Yes | Page title (browser tab + h1) |
description | No | Meta description for SEO |
Note: If you use a manual sidebars.ts, sidebar_position is ignored — the order in sidebars.ts wins.
Step 3 — Add to sidebars.ts
Open sidebars.ts. Add the doc ID to the correct category.
Doc ID = file path without .md.
Example: docs/getting-started/deployment.md → getting-started/deployment
{
type: 'category',
label: 'Getting Started',
items: [
'getting-started/index',
'getting-started/installation',
'getting-started/local-setup',
'getting-started/cloud-setup',
'getting-started/deployment', // ← new
],
}
Step 4 — Save and Verify
- Save the file
- The dev server reloads automatically
- Open
http://localhost:3000/docs/getting-started/deployment
The page should appear in the sidebar.
Adding Images
Place images in static/img/. Reference them with /img/:

Adding Code Blocks
Use triple backticks with a language:
```bash
npm install
```
Supported languages in Nocturne:
python,bash,yaml,markdown,jsontypescript,jsx,tsxsql,go,rust
Adding a Table
| Column A | Column B |
|---|---|
| Value 1 | Value 2 |
Adding Admonitions
Docusaurus supports admonitions:
:::note
This is a note.
:::
:::tip
This is a tip.
:::
:::warning
This is a warning.
:::
:::danger
This is a danger.
:::
Adding Internal Links
Link to other docs using absolute paths:
See [Installation](/docs/getting-started/installation).
Adding External Links
Standard Markdown:
[Visit Nocturne](https://nocturne.axcora.com)
Common Patterns
Overview Page
---
sidebar_position: 1
sidebar_label: Overview
title: "Section — Overview"
description: "Overview of this section."
---
# Section
Brief intro.
## What You'll Learn
- Item 1
- Item 2
## What's Next?
👉 [Next: First Doc →](/docs/section/first-doc)
Step-by-Step Guide
## Step 1 — Do This
Explanation.
```bash
command
```
## Step 2 — Do That
Explanation.
Reference Page
## Field Name
| Field | Type | Description |
|---|---|---|
| `name` | string | The name |
Adding to Decap CMS
Decap CMS can edit docs. But you must add the doc to sidebars.ts manually.
Decap CMS can:
- Edit existing docs
- Create new doc files
- Set frontmatter
Decap CMS cannot:
- Add the doc to
sidebars.ts - Create new categories
See Decap CMS → Adding a New Category for details.
Troubleshooting
Doc doesn't appear in the sidebar
- Check the doc ID in
sidebars.tsmatches the file path - Check that the file has
.mdextension - Restart the dev server
"These sidebar document ids do not exist"
A doc ID in sidebars.ts doesn't match a file. Check spelling and folder structure.
Frontmatter error
- Check that frontmatter starts and ends with
--- - Check YAML syntax — no tabs, use spaces
- Check that strings with special characters are quoted
Image doesn't load
- Check that the file exists in
static/img/ - Check that the path starts with
/img/ - Check the file extension
What's Next?
Now let's add a new category.