| title | Configuration |
|---|---|
| description | Learn how to customize your ObjectDocs site through objectdocs.json and meta.json files. |
import { Settings, Palette, Navigation, Layout } from 'lucide-react';
ObjectDocs follows a Configuration as Code approach. All site settings are defined in JSON files, making it easy to version control and collaborate.
The main configuration file is located at packages/site/objectdocs.json. This file controls global settings for your entire documentation site.
{
"meta": {
"title": "ObjectStack Docs",
"description": "Enterprise-grade low-code platform documentation",
"url": "https://docs.objectstack.ai",
"favicon": "/favicon.ico"
},
"i18n": {
"enabled": true,
"defaultLanguage": "en",
"languages": ["en", "cn"]
},
"branding": {
"logo": {
"text": "ObjectStack",
"light": "/logo.svg",
"dark": "/logo.svg"
},
"theme": {
"accentColor": "blue",
"radius": "0.5rem"
}
},
"layout": {
"navbar": {
"enabled": true,
"transparentMode": "top",
"links": [
{
"text": "Home",
"url": "https://www.objectstack.ai",
"external": true
}
],
"socials": [
{ "platform": "github", "url": "https://github.com/objectstack-ai/" }
]
},
"sidebar": {
"enabled": true,
"prefetch": true,
"defaultOpenLevel": 1,
"collapsible": true
},
"toc": {
"enabled": true,
"depth": 3
},
"footer": {
"enabled": false,
"copyright": "© 2026 ObjectStack Inc."
}
},
"page": {
"showLastUpdate": true,
"showEditLink": true,
"repoBaseUrl": "https://github.com/objectstack-ai/docs"
},
"content": {
"math": false,
"imageZoom": true,
"codeBlock": {
"theme": "vesper",
"showLineNumbers": true
}
}
}{
"meta": {
"title": "Your Site Title",
"description": "Site description for SEO",
"url": "https://docs.example.com",
"favicon": "/favicon.ico"
}
}Enable multi-language support:
{
"i18n": {
"enabled": true,
"defaultLanguage": "en",
"languages": ["en", "cn", "es", "fr"]
}
}When enabled, ObjectDocs will:
- Create language-specific routes (
/en/docs,/cn/docs) - Look for translated content in language-specific directories
- Display language switcher in the navbar
{
"branding": {
"logo": {
"text": "Your Brand",
"light": "/logo-light.svg",
"dark": "/logo-dark.svg"
}
}
}- text: Displayed next to the logo image
- light: Logo for light mode
- dark: Logo for dark mode (optional, falls back to light)
{
"branding": {
"theme": {
"accentColor": "blue",
"radius": "0.5rem"
}
}
}- accentColor: Primary theme color (blue, purple, green, etc.)
- radius: Border radius for UI components
{
"layout": {
"navbar": {
"enabled": true,
"transparentMode": "top",
"links": [
{
"text": "Guide",
"url": "/docs",
"external": false
},
{
"text": "Blog",
"url": "https://blog.example.com",
"external": true
}
],
"socials": [
{ "platform": "github", "url": "https://github.com/yourusername" },
{ "platform": "twitter", "url": "https://twitter.com/yourusername" }
]
}
}
}- transparentMode:
"top"|"always"|"none" - links: Array of navigation links
- socials: Social platform links (supports github, twitter, discord, etc.)
{
"layout": {
"sidebar": {
"enabled": true,
"prefetch": true,
"defaultOpenLevel": 1,
"collapsible": true,
"tabs": []
}
}
}- prefetch: Prefetch linked pages for faster navigation
- defaultOpenLevel: How many levels to expand by default (0 = collapsed, 1 = first level, etc.)
- collapsible: Allow users to collapse sidebar sections
- tabs: Optional sidebar tabs for multi-product docs
{
"layout": {
"toc": {
"enabled": true,
"depth": 3
}
}
}- depth: Maximum heading level to show (1-6)
{
"page": {
"showLastUpdate": true,
"showEditLink": true,
"repoBaseUrl": "https://github.com/yourusername/yourrepo"
}
}- showLastUpdate: Display last modified date from git
- showEditLink: Show "Edit this page" link
- repoBaseUrl: GitHub repository URL for edit links
{
"content": {
"math": false,
"imageZoom": true,
"codeBlock": {
"theme": "vesper",
"showLineNumbers": true
}
}
}- math: Enable LaTeX math rendering
- imageZoom: Allow users to click images to zoom
- codeBlock.theme: Syntax highlighting theme
- codeBlock.showLineNumbers: Display line numbers in code blocks
Each directory in content/docs/ can have a meta.json file to control its sidebar structure:
{
"title": "Section Title",
"pages": [
"first-page",
"second-page",
"---Subsection---",
"nested-directory"
]
}The order of items in the pages array determines the sidebar order:
{
"title": "Getting Started",
"pages": [
"installation", // Appears first
"architecture", // Appears second
"configuration" // Appears third
]
}Add visual separators in the sidebar:
{
"pages": [
"intro",
"---Basic Guides---",
"guide-1",
"guide-2",
"---Advanced---",
"advanced-1"
]
}Don't repeat configuration across multiple files. Use the global objectdocs.json for site-wide settings.
Choose descriptive names for page slugs that reflect the content:
- ✅
installation.mdx - ✅
api-reference.mdx - ❌
page1.mdx - ❌
doc.mdx
All configuration is in JSON files, making it easy to:
- Track changes in git
- Review configuration updates
- Roll back if needed
Always run pnpm dev to verify configuration changes before deploying.