Configuration
Learn how to customize your ObjectDocs site via JSON files.
Configuration
ObjectDocs follows the Configuration as Code principle. All site settings are defined via JSON files, making them easy to version control and collaborate on.
Global Configuration
docs.site.json
The main configuration file is located at content/docs.site.json. This file controls the global settings for the entire documentation site and is automatically synced to content/.fumadocs during build and development.
{
"branding": {
"name": "ObjectDocs",
"logo": {
"light": "/logo.svg",
"dark": "/logo-dark.svg"
}
},
"links": [
{ "text": "Guide", "url": "/docs" },
{ "text": "GitHub", "url": "https://github.com/objectstack-ai", "icon": "github" }
],
"i18n": {
"defaultLanguage": "en",
"languages": ["en", "zh-CN", "ja", "es", "fr", "de", "ko", "ru", "pt", "ar", "hi", "it", "tr", "vi"]
}
}How it Works:
- Stored in
content/docs.site.json(your content directory) - Copied to
content/.fumadocsbefore each build/dev command - Watched during development - changes trigger automatic server restart
- Supports 14 languages for internationalization
Configuration Options
| Property | Type | Description |
|---|---|---|
branding.name | string | Site name, displayed on the left side of the navbar. |
branding.logo | object | Site logo image paths, supports light/dark mode. |
links | array | List of links in the top navigation bar. |
i18n.defaultLanguage | string | Default language code (e.g., "en", "zh-CN"). |
i18n.languages | array | Supported languages (14 available: en, zh-CN, ja, es, fr, de, ko, ru, pt, ar, hi, it, tr, vi). |
Development Features:
- Config changes are automatically detected during
npm run dev - Server restarts when
docs.site.jsonis modified - No manual restart needed for configuration updates
Directory & Navigation Configuration
meta.json
Each documentation directory can contain a meta.json file, which maps to the sidebar structure and page order for that directory.
Example Structure:
content/docs/
├── meta.json # Root directory config
├── index.mdx
└── getting-started/
├── meta.json # Subdirectory config
├── index.mdx
└── configuration.mdxcontent/docs/meta.json:
{
"title": "Documentation",
"pages": [
"index",
"getting-started",
"components"
]
}content/docs/getting-started/meta.json:
{
"title": "Quick Start",
"pages": [
"index", // Maps to index.mdx (Quick Start)
"architecture", // Maps to architecture.mdx
"configuration" // Maps to configuration.mdx
]
}Without meta.json
If meta.json is missing, ObjectDocs will automatically list all .mdx files in that directory alphabetically. For official documentation, we strongly recommend using meta.json to ensure controlled ordering.
Page Configuration (Frontmatter)
Top of each MDX file can contain Frontmatter metadata:
---
title: Page Title
description: Page description (used for SEO and search preview)
icon: Rocket # Optional: Page icon name
full: false # Optional: Whether to hide the right Table of Contents
---