Content
Learn how to create and organize documentation pages using MDX files
Documentation pages in Docs Kit are created using MDX (Markdown with JSX) files stored in the content/ directory. MDX allows you to write standard Markdown while incorporating React components for rich, interactive content.
The content/ directory is organized by content type:
content/
├── docs/ # General documentation pages
│ ├── introduction.mdx
│ ├── installation.mdx
│ └── quick-start.mdx
│
├── api-reference/ # API documentation pages
│ ├── introduction.mdx
│ ├── authentication.mdx
│ └── otp/
│ ├── request.mdx
│ └── verify.mdx
│
└── changelog/ # Release notes and updates
├── mails.mdx
└── texts.mdx
You can create any directory structure within content/ that fits your needs.
The folder structure doesn't affect URL routing.
Create a new file in the appropriate directory. For example, for a getting started guide:
touch content/docs/getting-started.mdxThe filename becomes part of the URL path: /docs/getting-started
Every MDX file must start with frontmatter containing page metadata:
---
title: "Getting Started Guide"
description: "Quick guide to get you up and running"
published: true
order: 5
---Add your content using Markdown syntax and MDX components:
## Welcome
This guide will help you get started with our platform.
<Callout status="info" title="Prerequisites">
Make sure you have Node.js 18+ installed before continuing.
</Callout>Update config/docs.config.ts to include your page in the sidebar:
{
"navigation": {
"tabs": [
{
"tab": "Documentation",
"groups": [
{
"group": "Getting Started",
"pages": [
"/docs/getting-started"
]
}
]
}
]
}
}Follow these conventions for consistent URLs:
getting-started.mdx not Getting-Started.mdxapi-reference.mdx not api_reference.mdxconfiguring-webhooks.mdx not config.mdxsetup.mdx not how-to-setup-your-application.mdxThe file path maps directly to the URL:
| File Path | URL |
|---|---|
content/docs/introduction.mdx | /docs/introduction |
content/api-reference/otp/request.mdx | /api-reference/otp/request |
content/changelog/mails.mdx | /changelog/mails |
Unlike Next.js, there are no index.mdx files. Each page needs a unique
filename.
Group related content by feature or functionality:
content/docs/
├── authentication/
│ ├── overview.mdx
│ ├── api-keys.mdx
│ └── oauth.mdx
└── webhooks/
├── setup.mdx
└── events.mdx
Organize content by the user's learning path:
content/docs/
├── getting-started/
│ ├── installation.mdx
│ └── first-project.mdx
├── guides/
│ ├── sending-emails.mdx
│ └── handling-webhooks.mdx
└── advanced/
├── rate-limiting.mdx
└── custom-domains.mdx
Separate different types of documentation:
content/
├── docs/ # Conceptual documentation
├── api-reference/ # API endpoint documentation
├── guides/ # Step-by-step tutorials
└── changelog/ # Release notes
Create nested page structures using subdirectories:
content/docs/api/
├── overview.mdx → /docs/api/overview
├── authentication/
│ ├── oauth.mdx → /docs/api/authentication/oauth
│ └── api-keys.mdx → /docs/api/authentication/api-keys
└── endpoints/
├── users.mdx → /docs/api/endpoints/users
└── webhooks.mdx → /docs/api/endpoints/webhooks
Link to other documentation pages using relative or absolute paths:
<!-- Absolute path (recommended) -->
Check out the [Installation Guide](/docs/installation) for setup instructions.
<!-- Relative path -->
See the [Authentication section](./authentication) for more details.
<!-- Link to specific heading -->
Read about [Configuration Options](/docs/setup#configuration-options).
Always use the URL path (not the file path) when linking. Omit the .mdx
extension.
Store images in the public/ directory and reference them in your content:

Organize images by section:
public/
└── images/
├── getting-started/
│ └── setup.png
└── api/
└── response-example.png
Then reference them:

Create draft pages that aren't visible on the site:
---
title: "Work in Progress"
description: "This page is not ready yet"
published: false
---
Draft pages:
Each page should cover one topic thoroughly:
✅ Good: /docs/authentication/api-keys.mdx
❌ Too broad: /docs/authentication-and-security-and-permissions.mdx
Make titles clear and searchable:
✅ Good: "Configuring Webhook Endpoints" ❌ Vague: "Configuration"
Use headings to create a clear hierarchy:
## Main Topic
### Subtopic 1
Content about subtopic 1...
### Subtopic 2
Content about subtopic 2...
## Another Main Topic
Use callouts to highlight important information:
<Callout status="warning" title="Breaking Change">
This feature requires API version 2.0 or higher.
</Callout>
---
title: "Building Your First Integration"
description: "Step-by-step guide to creating your first API integration"
published: true
---
## Overview
Brief introduction to what you'll build...
## Prerequisites
<ParamField path="API Key" type="string" required>
Get your API key from the dashboard
</ParamField>
## Steps
<Steps>
<Step title="Setup">Instructions...</Step>
...
</Steps>
---
title: "Configuration Reference"
description: "Complete configuration options reference"
published: true
---
## Options
<ParamField path="apiKey" type="string" required>
Your API authentication key
</ParamField>
<ParamField path="timeout" type="number">
Request timeout in milliseconds. Default: 5000
</ParamField>
If your page doesn't appear:
published: true in frontmatterdocs.config.tsIf internal links are broken:
/.mdx extensionNow that you understand how to create pages, learn about Frontmatter options to configure page metadata.