Quick Start
Create your first ObjectDocs site in minutes.
Quick Start
ObjectDocs is a modern documentation engine based on Next.js 14 and Fumadocs, supporting the "Configuration as Code" philosophy. This guide will help you quickly set up a new documentation project.
Prerequisites
Ensure your environment meets the following requirements:
- Node.js: 18.17 or higher
- Package Manager: pnpm is recommended (npm or yarn also work)
1. Initialize ObjectDocs
ObjectDocs can be initialized in any existing project or as a new standalone project.
Option A: Using npm init (Recommended)
The fastest way to get started:
mkdir my-docs
cd my-docs
npm init @objectdocsThis automatically runs the init command and sets up everything you need.
Option B: Using npx
Initialize in an existing project:
cd your-existing-project
npx @objectdocs/cli initThis will:
- Copy the site engine from
@objectdocs/sitetocontent/.fumadocs - Create
content/package.jsonwith scripts (dev,build,start) - Install dependencies in
content/.fumadocs - Add
content/.fumadocsandcontent/node_modulesto.gitignore - Keep your project root clean
Create Content Directory
If not already created:
mkdir -p content/docs2. Add Content
ObjectDocs uses file-system routing. All documentation is stored in the content/docs directory.
Create Homepage
Create content/docs/index.mdx:
---
title: Welcome
description: Your new documentation site
---
# Hello World
Welcome to ObjectDocs! This is your homepage.Configure Sidebar
Create content/docs/meta.json to define page order:
{
"pages": ["index"]
}Configure Site Info
Create content/docs.site.json to configure site name and navigation:
{
"branding": {
"name": "My Docs"
},
"links": [
{
"text": "Home",
"url": "/"
}
]
}3. Start Development Server
Navigate to the content directory and start the development server:
cd content
npm run devThe development server will:
- Start on port 7777 (default)
- Watch for changes in
content/docs.site.jsonand automatically restart - Hot reload your MDX content changes
- Copy
public/assets to the site engine
Now visit http://localhost, and you should see your documentation site!
Next Steps
- Architecture - Understand ObjectDocs' directory structure and data flow
- Configuration - Learn more about configuration options
- Components - Embed interactive ObjectUI components in your docs