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. Create a New Project
We provide a CLI tool to quickly initialize your project. Run the following in your terminal:
Initialize Directory Structure
In your project root, create the following file structure:
mkdir -p content/docsInstall Dependencies
Install @objectdocs/cli as a development dependency:
pnpm add -D @objectdocs/cliConfigure Scripts
Add the following scripts to your package.json:
{
"scripts": {
"dev": "objectdocs dev",
"build": "objectdocs build",
"start": "objectdocs start"
}
}2. 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
Run the following command to start the service:
pnpm devNow visit http://localhost, and you should see your documentation site!
Next Steps
- Configuration - Learn more about configuration options
- Writing Content - Learn MDX syntax and component usage
- Deployment - Publish your documentation to production