Content
Complete reference for all configuration options in docs.config.ts
The config/docs.config.ts file is the central configuration for your documentation site. It controls navigation, styling, metadata, and features.
config/
└── docs.config.ts
After modifying docs.config.ts, restart your development server to see
changes.
{
"name": "Documentation",
"description": "Comprehensive guides and documentation",
"logo": {
"light": "/logo/light.svg",
"dark": "/logo/dark.svg"
},
"appearance": {
"default": "light"
},
"favicon": "/favicon.svg",
"colorPalette": "teal",
"navbar": {
"links": [
{ "label": "GitHub", "href": "https://github.com" },
{ "label": "Sign Up", "href": "/signup", "primary": true }
]
},
"navigation": {
"tabs": [
{
"tab": "Documentation",
"groups": [
{
"group": "Getting Started",
"pages": ["/docs/introduction", "/docs/installation"]
}
]
}
]
},
"footer": {
"socials": {
"github": "https://github.com",
"twitter": "https://twitter.com"
}
},
"search": {
"prompt": "Search documentation..."
},
"primaryTab": {
"name": "Documentation"
},
"openapi": {
"specPath": "public/openapi.json"
}
}
The name of your documentation site.
"name": "Acme API Documentation"Used in:
Brief description of your documentation site.
"description": "Complete guides and API reference for Acme platform"Used in:
Path to logo for light mode (dark-colored logo on light background).
"logo": {
"light": "/logo/light.svg"
}Path to logo for dark mode (light-colored logo on dark background).
"logo": {
"dark": "/logo/dark.svg"
}Path to favicon file in public/ directory.
"favicon": "/favicon.svg"Supported formats: .svg, .ico, .png
Color palette for the site theme.
Options: teal (default), blue, purple, pink, green, orange, red, cyan, gray, yellow
"colorPalette": "purple"Default color mode when users first visit.
Options: light (default), dark, system
"appearance": {
"default": "system"
}light - Always start in light modedark - Always start in dark modesystem - Follow user's system preferenceThe navigation structure defines your sidebar organization.
"navigation": {
"tabs": [...]
}
Array of navigation tabs. Each tab contains groups of pages.
"tabs": [
{
"tab": "Documentation",
"groups": [...]
},
{
"tab": "API Reference",
"groups": [...]
}
]Hide table of contents for all pages in this tab.
{
"tab": "Changelog",
"hideToc": true,
"groups": [...]
}Useful for changelog, landing pages, or pages without headings.
Array of page groups within the tab.
"groups": [
{
"group": "Getting Started",
"pages": [...]
}
]Array of page paths within the group.
"pages": [
"/docs/introduction",
"/docs/installation",
"/docs/quick-start"
]Important:
.mdx extension"navigation": {
"tabs": [
{
"tab": "Documentation",
"groups": [
{
"group": "Getting Started",
"pages": [
"/docs/introduction",
"/docs/installation",
"/docs/quick-start"
]
},
{
"group": "Guides",
"pages": [
"/docs/authentication",
"/docs/webhooks",
"/docs/error-handling"
]
}
]
},
{
"tab": "API Reference",
"groups": [
{
"group": "Users",
"pages": [
"/api-reference/users/create",
"/api-reference/users/get",
"/api-reference/users/update",
"/api-reference/users/delete"
]
}
]
},
{
"tab": "Changelog",
"hideToc": true,
"groups": [
{
"group": "Updates",
"pages": [
"/changelog/2024",
"/changelog/2023"
]
}
]
}
]
}
Array of links to display in the navbar.
"navbar": {
"links": [
{ "label": "GitHub", "href": "https://github.com/..." },
{ "label": "Blog", "href": "https://blog.example.com" },
{ "label": "Sign Up", "href": "/signup", "primary": true }
]
}URL or path for the link. Can be external or internal.
"href": "https://github.com/username/repo"Style link as primary button (filled, emphasized).
{ "label": "Sign Up", "href": "/signup", "primary": true }Visual difference:
primary: false (default) - Ghost button styleprimary: true - Filled button with brand color"navbar": {
"links": [
{ "label": "GitHub", "href": "https://github.com/user/repo" },
{ "label": "Discord", "href": "https://discord.gg/..." }
]
}"navbar": {
"links": [
{ "label": "Pricing", "href": "https://example.com/pricing" },
{ "label": "Blog", "href": "https://blog.example.com" },
{ "label": "Login", "href": "/login" },
{ "label": "Sign Up", "href": "/signup", "primary": true }
]
}"navbar": {
"links": [
{ "label": "API Status", "href": "https://status.example.com" },
{ "label": "Get API Key", "href": "/dashboard", "primary": true }
]
}Social media links displayed in the footer.
"footer": {
"socials": {
"github": "https://github.com/username",
"twitter": "https://twitter.com/username",
"discord": "https://discord.gg/invite",
"linkedin": "https://linkedin.com/company/name"
}
}Supported platforms:
github - GitHub profile or organizationtwitter - Twitter/X profilediscord - Discord invite linklinkedin - LinkedIn profile or company"footer": {
"socials": {
"github": "https://github.com/acme",
"twitter": "https://twitter.com/acme",
"discord": "https://discord.gg/acme"
}
}
Icons are automatically displayed for each platform with proper branding colors.
Placeholder text in the search input.
"search": {
"prompt": "Search documentation..."
}Default: "Search..."
The search feature automatically indexes:
Users can open search with Cmd/Ctrl + K from anywhere on the site.
The default tab to show when users first visit the site.
"primaryTab": {
"name": "Documentation"
}Must match the tab name from navigation.tabs.
Example:
"navigation": {
"tabs": [
{
"tab": "Documentation", // Primary tab
"groups": [...]
},
{
"tab": "API Reference",
"groups": [...]
}
]
},
"primaryTab": {
"name": "Documentation" // Matches tab name above
}
Path to OpenAPI specification file.
"openapi": {
"specPath": "public/openapi.json"
}Can be:
public/openapi.jsonhttps://api.example.com/openapi.jsonLearn more in the OpenAPI Setup guide.
Some settings can be overridden with environment variables:
The public URL of your documentation site.
NEXT_PUBLIC_SITE_URL=https://docs.example.comUsed for:
Google Analytics measurement ID for tracking.
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXXAdd analytics without modifying code.
For sites with many pages, organize navigation into logical groups:
"groups": [
{
"group": "Getting Started",
"pages": ["/docs/intro", "/docs/install"]
},
{
"group": "Core Concepts",
"pages": ["/docs/auth", "/docs/errors", "/docs/webhooks"]
},
{
"group": "Advanced",
"pages": ["/docs/rate-limits", "/docs/custom-domains"]
}
]
Use tabs to separate different types of content:
"tabs": [
{
"tab": "Guides", // Tutorials and how-tos
"groups": [...]
},
{
"tab": "API Reference", // Endpoint documentation
"groups": [...]
},
{
"tab": "SDKs", // Language-specific guides
"groups": [...]
},
{
"tab": "Changelog", // Release notes
"hideToc": true,
"groups": [...]
}
]
Control display order explicitly in the pages array:
"pages": [
"/docs/introduction", // Shown first
"/docs/installation", // Shown second
"/docs/quick-start", // Shown third
"/docs/advanced" // Shown fourth
]
Alphabetical order is not used - only array order matters.
Docs Kit validates your configuration at build time:
Missing required field:
{
"name": "My Docs"
// ❌ Error: Missing required field 'description'
}
Invalid navigation structure:
"pages": [
"/docs/nonexistent-page" // ❌ Error: File doesn't exist
]
Invalid color palette:
"colorPalette": "rainbow" // ❌ Error: Invalid palette name
Mismatched primary tab:
"primaryTab": {
"name": "Guides" // ❌ Error: No tab named "Guides" in navigation
}
{
"name": "Your Documentation",
"description": "Comprehensive guides and documentation for your platform",
"logo": {
"light": "/logo/light.svg",
"dark": "/logo/dark.svg"
},
"appearance": {
"default": "system"
},
"favicon": "/favicon.svg",
"colorPalette": "teal",
"navbar": {
"links": [
{ "label": "Website", "href": "https://example.com" },
{ "label": "GitHub", "href": "https://github.com/..." },
{ "label": "Get Started", "href": "/signup", "primary": true }
]
},
"navigation": {
"tabs": [
{
"tab": "Documentation",
"groups": [
{
"group": "Getting Started",
"pages": [
"/docs/introduction",
"/docs/installation",
"/docs/quick-start"
]
},
{
"group": "Guides",
"pages": ["/docs/authentication", "/docs/webhooks"]
}
]
},
{
"tab": "API Reference",
"groups": [
{
"group": "Endpoints",
"pages": ["/api-reference/users", "/api-reference/webhooks"]
}
]
}
]
},
"footer": {
"socials": {
"github": "https://github.com/...",
"twitter": "https://twitter.com/...",
"discord": "https://discord.gg/..."
}
},
"search": {
"prompt": "Search documentation..."
},
"primaryTab": {
"name": "Documentation"
},
"openapi": {
"specPath": "public/openapi.json"
}
}
Next, learn about the MDX Components available for rich content.