`
- Columns with plain content: Wrap content in `` inside ``
- Cards always need `title` and `href` attributes
- Card layouts: `horizontal={false}` (default, stacked) or `horizontal={true}` (side-by-side)
**Icons:**
- Lucide icons: Use icon names without suffix, e.g., `icon="zap"`, `icon="book-open"`
- See [Lucide icons](https://lucide.dev/icons/) for complete list
**Optional attributes:**
- `title-type` on Steps: Defaults to `p`, use `h2` or `h3` for semantic heading structure
- `default-open` on Expandable: Defaults to `false`
- `collapsed` on Callout: Defaults to `false`
- `show-lines` on code blocks: Defaults to `false`
### Headings and text
Documentation.AI pages support standard markdown for headings, paragraphs, and inline formatting:
#### Heading hierarchy
- H1 is automatically generated from the frontmatter `title` field
- Start page content with H2 (`##`) and maintain proper hierarchy
- Use H2 for main sections, H3 for subsections, H4 for detailed subsections
- Keep headings descriptive and keyword-rich for navigation and SEO
```markdown
## Main section heading
### Subsection heading
#### Detailed subsection
```
```
--------------------------------
### Minimal documentation.json Configuration
Source: https://documentation.ai/docs/write-and-publish/code-editor
A minimal example of a `documentation.json` file to define sidebar navigation groups and pages. Ensure `path` values match your file structure.
```json
{
"tabs": [
{
"tab": "Documentation",
"groups": [
{
"group": "Getting Started",
"pages": [
{ "title": "Introduction", "path": "getting-started/introduction" },
{ "title": "Quickstart", "path": "getting-started/quickstart" }
]
}
]
}
]
}
```
--------------------------------
### Navbar Configuration Example
Source: https://documentation.ai/docs/customize/site-configuration
Configure the top navigation bar with primary actions and secondary links. Use this to define main calls-to-action and supplementary navigation options.
```json
{
"navbar": {
"actions": {
"primary": {
"title": "Get Started",
"link": "https://dashboard.example.com/signup"
},
"links": [
{
"title": "Login",
"link": "https://dashboard.example.com/login"
},
{
"title": "Support",
"link": "mailto:support@example.com"
}
]
}
}
}
```
--------------------------------
### Tabs Component with Icons and Platform-Specific Content
Source: https://documentation.ai/docs/components/tabs
This example shows how to use the Tabs component with icons and platform-specific installation instructions in MDX. Each tab includes a code block for bash commands.
```jsx
Install using Homebrew for the best experience on macOS.
```bash
brew install documentation-ai
```
Download and run the Windows installer from the releases page.
```bash
winget install documentation-ai
```
Use your package manager or download the binary directly.
```bash
sudo apt install documentation-ai
```
```
--------------------------------
### OpenAPI Specification Example
Source: https://documentation.ai/docs/api-documentation-and-playground/code-generation
An example of an OpenAPI specification that can be used to automatically generate code examples for API endpoints.
```yaml
# Your OpenAPI specification automatically generates code
paths:
/users/{id}:
get:
summary: Get user by ID
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: User details
content:
application/json:
schema:
$ref: '#/components/schemas/User'
```
--------------------------------
### Documentation.AI Components and Settings Prompt
Source: https://documentation.ai/docs/write-and-publish/prompts
Use this prompt to guide an AI assistant in utilizing Documentation.AI components and MDX syntax.
```markdown
# Documentation.AI Components and Settings Prompt
You are an AI assistant specialized in creating technical documentation using Documentation.AI components and MDX syntax.
```
--------------------------------
### Basic Site Settings
Source: https://documentation.ai/docs/customize/site-configuration
Configure the site name and the initial route for your documentation. The site name appears in the browser title and navigation header. The initial route specifies the default page path.
```json
{
"name": "Documentation.AI",
"initialRoute": "getting-started/introduction"
}
```
--------------------------------
### Configure Paperguide Project Settings
Source: https://documentation.ai/docs/customize/site-configuration
Defines the full project configuration including branding, navigation structure, and OpenAPI integration.
```json
{
"name": "Paperguide Documentation",
"initialRoute": "introduction",
"logo-dark": "https://example.com/logo-dark.svg",
"logo-light": "https://example.com/logo-light.svg",
"logo-small-dark": "https://example.com/favicon-dark.svg",
"logo-small-light": "https://example.com/favicon-light.svg",
"colors": {
"light": {
"brand": "#3B82F6",
"heading": "#1a1a1a",
"text": "#374151"
},
"dark": {
"brand": "#60A5FA",
"heading": "#f2f2f2",
"text": "#c1c1c1"
}
},
"navbar": {
"actions": {
"primary": {
"title": "Get Started",
"link": "https://dashboard.paperguide.com/signup"
},
"links": [
{
"title": "Login",
"link": "https://dashboard.paperguide.com/login"
}
]
}
},
"navigation": {
"products": [
{
"product": "Paperguide",
"versions": [
{
"version": "v1",
"languages": [
{
"language": "English",
"tabs": [
{
"tab": "Getting Started",
"icon": "rocket",
"pages": [
{
"title": "Introduction",
"path": "introduction",
"icon": "home"
}
]
},
{
"tab": "Documentation",
"icon": "book",
"dropdowns": [
{
"dropdown": "Core Features",
"icon": "lightbulb",
"dropdowns": [
{
"dropdown": "Content Management",
"pages": [
{
"title": "Spaces",
"path": "spaces",
"icon": "folder"
},
{
"title": "Pages",
"path": "pages",
"icon": "file-text"
}
]
}
]
},
{
"dropdown": "Advanced Features",
"icon": "zap",
"pages": [
{
"title": "Webhooks",
"path": "webhooks",
"icon": "link"
}
]
}
]
},
{
"tab": "API Reference",
"icon": "code",
"groups": [
{
"group": "REST API",
"openapi": "api-reference/openapi.yaml",
"pages": [
{
"title": "Authentication",
"path": "api-reference/authentication"
}
]
}
]
}
]
}
]
}
]
}
]
},
"seo": {
"robots:index": true,
"robots:follow": true
}
}
```
--------------------------------
### Configure Product Navigation
Source: https://documentation.ai/docs/customize/site-configuration
Use this JSON structure to organize documentation by product. Each product can have associated tabs and groups.
```json
{
"navigation": {
"products": [
{
"product": "API Platform",
"icon": "code",
"tabs": [
{
"tab": "Documentation",
"groups": [...]
}
]
},
{
"product": "Dashboard",
"icon": "layout-dashboard",
"pages": [...]
}
]
}
}
```
--------------------------------
### Configure Clarity via documentation.json
Source: https://documentation.ai/docs/integrations/clarity
Add the 'clarity' key under 'integrations' in your documentation.json file to enable the integration. Replace 'your_project_id' with your actual Clarity Project ID.
```json
{
"integrations": {
"clarity": {
"projectId": "your_project_id"
}
}
}
```
--------------------------------
### Configure documentation.json
Source: https://documentation.ai/docs/write-and-publish/cursor
Create a `documentation.json` file with your site configuration. Never commit API keys or secrets to version control.
```json
{
"name": "Your Documentation",
"initialRoute": "getting-started/introduction"
}
```
--------------------------------
### Generate Go API Client
Source: https://documentation.ai/docs/api-documentation-and-playground/code-generation
Demonstrates creating a user via POST request with JSON marshaling, error handling, and resource cleanup.
```go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
}
func createUser() (*User, error) {
user := User{
Name: "John Doe",
Email: "john@example.com",
}
jsonData, err := json.Marshal(user)
if err != nil {
return nil, err
}
req, err := http.NewRequest("POST", "/api/users", bytes.NewBuffer(jsonData))
if err != nil {
return nil, err
}
req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
var createdUser User
if err := json.NewDecoder(resp.Body).Decode(&createdUser); err != nil {
return nil, err
}
return &createdUser, nil
}
```
--------------------------------
### API POST Request Example
Source: https://documentation.ai/docs/write-and-publish/claude-code
Shows how to send a POST request to an API endpoint for creating documentation. Includes request body and headers in JavaScript and Python.
```javascript
const response = await fetch('https://api.documentation.ai/docs', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer TOKEN'
},
body: JSON.stringify({
title: "Getting Started",
content: "Welcome to our API"
})
});
```
```python
import requests
response = requests.post(
'https://api.documentation.ai/docs',
headers={'Authorization': 'Bearer TOKEN'},
json={'title': 'Getting Started', 'content': 'Welcome to our API'}
)
```
--------------------------------
### Example Callout in JSX
Source: https://documentation.ai/docs/write-and-publish/web-editor
Use callouts to emphasize best practices or caveats that readers should not miss. This example shows a 'tip' callout in JSX format.
```jsx
Use callouts to emphasize best practices or caveats that readers should not miss.
```
--------------------------------
### Define Simple Navigation Structure
Source: https://documentation.ai/docs/customize/site-configuration
Create a basic documentation site layout using tabs and groups without versioning.
```json
{
"name": "Documentation.AI",
"initialRoute": "getting-started/introduction",
"colors": {
"light": { "brand": "#3143e3" },
"dark": { "brand": "#85a1ff" }
},
"navigation": {
"tabs": [
{
"tab": "Documentation",
"icon": "book",
"groups": [
{
"group": "Getting Started",
"icon": "rocket",
"expandable": false,
"pages": [
{
"title": "Introduction",
"path": "getting-started/introduction",
"icon": "star"
},
{
"title": "Quickstart",
"path": "getting-started/quickstart",
"icon": "zap"
}
]
}
]
},
{
"tab": "API Reference",
"icon": "code",
"groups": [
{
"group": "Endpoints",
"openapi": "api-reference/openapi.json",
"pages": [
{
"title": "Authentication",
"path": "api-reference/auth"
}
]
}
]
}
]
}
}
```
--------------------------------
### Complete Branding Setup Configuration
Source: https://documentation.ai/docs/customize/branding
A comprehensive JSON configuration for branding, including site name, light and dark logos (main and small/favicon), and color schemes for both themes.
```json
{
"name": "Documentation.AI",
"logo-dark": "https://cdn.example.com/logo-dark.svg",
"logo-light": "https://cdn.example.com/logo-light.svg",
"logo-small-dark": "https://cdn.example.com/favicon-dark.png",
"logo-small-light": "https://cdn.example.com/favicon-light.png",
"colors": {
"light": {
"brand": "#3143e3",
"heading": "#1a1a1a",
"text": "#374151"
},
"dark": {
"brand": "#85a1ff",
"heading": "#f2f2f2",
"text": "#c1c1c1"
}
}
}
```
--------------------------------
### Display API Response Examples
Source: https://documentation.ai/docs/components/api-components
Use the `Response` component to display API response examples, typically beneath `Request` content. It supports tabs for different status codes like `200` and `500`.
```json
{
"id": "doc-123",
"status": "success"
}
```
```json
{
"error": "Internal server error",
"code": "INTERNAL_ERROR"
}
```
--------------------------------
### Configure Heap via documentation.json
Source: https://documentation.ai/docs/integrations/heap
Add the 'heap' key under 'integrations' in your documentation.json file to enable Heap analytics. Ensure you replace 'your_app_id' with your actual Heap app ID.
```json
{
"integrations": {
"heap": {
"appId": "your_app_id"
}
}
}
```
--------------------------------
### GET api/projects/list
Source: https://documentation.ai/docs/api-documentation-and-playground/organize-api-reference
Lists all available projects.
```APIDOC
## GET api/projects/list
### Description
Returns a list of all projects.
### Method
GET
### Endpoint
api/projects/list
```
--------------------------------
### Configure Crisp via documentation.json
Source: https://documentation.ai/docs/integrations/crisp
Add the crisp integration settings to your project configuration file.
```json
{
"integrations": {
"crisp": {
"websiteId": "your_website_id"
}
}
}
```
--------------------------------
### GET api/users/get
Source: https://documentation.ai/docs/api-documentation-and-playground/organize-api-reference
Retrieves user information.
```APIDOC
## GET api/users/get
### Description
Retrieves details for a specific user.
### Method
GET
### Endpoint
api/users/get
```
--------------------------------
### GET /api/users/{id}
Source: https://documentation.ai/docs/api-documentation-and-playground/openapi-import
Retrieve detailed information for a specific user.
```APIDOC
## GET /api/users/{id}
### Description
Retrieve detailed information for a specific user.
### Method
GET
### Endpoint
/api/users/{id}
#### Path Parameters
- **id** (string) - Required - Unique identifier for the user.
### Request Example
```javascript
const response = await fetch('/api/users/123', {
headers: { 'Authorization': 'Bearer TOKEN' }
});
```
### Response
#### Success Response (200)
- **id** (string) - Unique identifier for the user.
- **name** (string) - Full name of the user.
- **email** (string) - Email address of the user.
#### Response Example
```json
{
"id": "123",
"name": "John Doe",
"email": "john@example.com"
}
```
```
--------------------------------
### Callout Component Usage
Source: https://documentation.ai/docs/write-and-publish/claude-code
Examples of different callout types for contextual information.
```jsx
Supplementary information that supports the main content without interrupting flow
Expert advice, shortcuts, or best practices that enhance user success
Critical information about potential issues, breaking changes, or actions requiring attention
Warnings about destructive actions, data loss, or irreversible operations
Positive confirmations, successful completions, or achievement indicators
```
--------------------------------
### Configure Mixpanel via documentation.json
Source: https://documentation.ai/docs/integrations/mixpanel
Add the `mixpanel` key under `integrations` in your `documentation.json` file to enable the integration. Ensure you replace `your_project_token` with your actual Mixpanel project token.
```json
{
"integrations": {
"mixpanel": {
"projectToken": "your_project_token"
}
}
}
```
--------------------------------
### Markdown Inline Formatting
Source: https://documentation.ai/docs/write-and-publish/claude-code
Examples of bold, italic, inline code, and link syntax.
```markdown
Use **bold** for emphasis and `inline code` for technical terms.
Create [descriptive links](https://documentation.ai) instead of "click here".
Use *italic* sparingly for subtle emphasis.
Combine formatting: **bold with `code`** when needed.
```
--------------------------------
### Implement OAuth 2.0 Client Credentials Flow
Source: https://documentation.ai/docs/api-documentation-and-playground/code-generation
Examples for obtaining and using an access token via the OAuth 2.0 client credentials flow.
```javascript
// OAuth 2.0 client credentials flow
async function getAccessToken() {
const response = await fetch('/oauth/token', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Basic ' + btoa('CLIENT_ID:CLIENT_SECRET')
},
body: 'grant_type=client_credentials&scope=read write'
});
const tokenData = await response.json();
return tokenData.access_token;
}
// Use token for API requests
const token = await getAccessToken();
const response = await fetch('/api/users', {
headers: {
'Authorization': `Bearer ${token}`
}
});
```
```python
import requests
import base64
def get_access_token():
credentials = base64.b64encode(f"CLIENT_ID:CLIENT_SECRET".encode()).decode()
response = requests.post(
'/oauth/token',
headers={
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': f'Basic {credentials}'
},
data='grant_type=client_credentials&scope=read write'
)
token_data = response.json()
return token_data['access_token']
# Use token for API requests
token = get_access_token()
response = requests.get(
'/api/users',
headers={'Authorization': f'Bearer {token}'}
)
```