Adding Pages

SuperDocs uses a file-system based routing, but the sidebar navigation is explicitly defined in docs-config.json. This gives you full control over the order and hierarchy of your docs.

Step 1: Create the File

Create a new Markdown or MDX file anywhere in your content folder.

my-docs/
guides/
new-page.mdx

Step 2: Add Frontmatter

Add metadata to your file. SuperDocs supports extensive frontmatter for SEO and page configuration:

Basic Frontmatter

---
title: My New Guide
description: This is a new guide I created.
---
# My New Guide
Content goes here...

Full SEO Frontmatter

For complete SEO control, you can add additional fields:

---
title: My New Guide
description: A comprehensive guide to getting started.
canonical: https://docs.example.com/guides/new-page
ogImage: /images/guide-og.png
ogType: article
keywords:
- tutorial
- guide
- getting started
author: Your Name
publishDate: 2025-01-01
modifiedDate: 2025-01-15
tags:
- beginner
- tutorial
section: Guides
readingTime: 10
noIndex: false
---

See the SEO & Meta Tags guide for details on all available frontmatter fields.

Step 3: Update Config

Add the page to your sidebar in docs-config.json.

{
"navigation": {
"sidebar": [
{
"label": "Guides",
"items": [
{
"label": "My New Guide",
"href": "/guides/new-page"
}
]
}
]
}
}

The href should match the file path relative to the root, minus the extension.

Frontmatter Reference

FieldRequiredDescription
titleYesPage title displayed in the header and browser tab.
descriptionRecommendedPage description for SEO and social sharing.
canonicalNoCustom canonical URL (auto-generated if not set).
ogImageNoCustom Open Graph image for this page.
authorNoAuthor name for article metadata.
publishDateNoPublication date (ISO 8601 format).
modifiedDateNoLast modified date (ISO 8601 format).
keywordsNoSEO keywords for this page.
tagsNoArticle tags/categories.
noIndexNoSet to true to hide from search engines.