Skip to content

Commit 6b7adab

Browse files
Copilothuangyiirene
andcommitted
Changes before error encountered
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 94d92bb commit 6b7adab

File tree

4 files changed

+27
-77
lines changed

4 files changed

+27
-77
lines changed

content/docs/index.mdx

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,5 @@
11
---
2-
title: Introduction
3-
description: The Metadata-Driven Documentation Engine for the Low-Code Era.
2+
title: Test
3+
description: Test page
44
---
5-
6-
import { FileJson, Layers, Cpu, Zap } from 'lucide-react';
7-
8-
# What is ObjectDocs?
9-
10-
**ObjectDocs** is a modern, opinionated documentation site generator built on top of **Next.js 14** and **Fumadocs**.
11-
12-
It was created to solve a specific problem in the **ObjectStack** ecosystem: *How do we document complex, multi-product low-code platforms without drowning in frontend maintenance?*
13-
14-
Unlike general-purpose static site generators (SSGs), ObjectDocs treats documentation structure as **data**, not code.
15-
16-
## Core Philosophy
17-
18-
<Cards>
19-
<Card
20-
icon={<FileJson />}
21-
title="Metadata-Driven"
22-
href="/docs/getting-started/configuration"
23-
>
24-
Control sidebars, navigation, and page ordering entirely through local `meta.json` files. No React knowledge required for content updates.
25-
</Card>
26-
<Card
27-
icon={<Cpu />}
28-
title="Low-Code Native"
29-
href="/docs/components"
30-
>
31-
Directly embed JSON schemas in Markdown. Render live, interactive components powered by ObjectQL definitions.
32-
</Card>
33-
</Cards>
34-
35-
## Why ObjectDocs?
36-
37-
### 1. Separation of Concerns
38-
In traditional documentation sites, adding a new section often requires editing a global `sidebar.js` config or touching React components. In ObjectDocs, we strictly separate roles:
39-
40-
* **Technical Writers**: Write `.mdx` content and manage local `meta.json` for sorting.
41-
* **Platform Architects**: Configure global `content/docs.site.json` (branding, nav links).
42-
* **Frontend Developers**: Maintain the base UI logic only when strictly necessary.
43-
44-
### 2. Interactive Components
45-
Static text is not enough to showcase the capabilities of a low-code platform. ObjectDocs allows you to mount live component demos directly in your docs.
46-
47-
## Next Steps
48-
49-
Ready to build your documentation?
50-
51-
<Cards>
52-
<Card title="Quick Start" href="/docs/getting-started" icon={<Zap />}>
53-
Install ObjectDocs and create your first page in under 5 minutes.
54-
</Card>
55-
<Card title="Architecture" href="/docs/getting-started/architecture" icon={<Layers />}>
56-
Deep dive into the directory structure and data flow.
57-
</Card>
58-
</Cards>
5+
# Test Page

content/docs/meta.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
{
2-
"title": "Documentation",
3-
"pages": [
4-
"index",
5-
"getting-started",
6-
"components",
7-
"development-plan"
8-
]
2+
"pages": ["index"]
93
}

packages/cli/src/commands/init.mjs

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,28 @@ export function registerInitCommand(cli) {
141141
stdio: 'inherit'
142142
});
143143

144-
installProcess.on('close', (code) => {
145-
if (code === 0) {
146-
console.log('\n✅ Dependencies installed successfully!');
147-
console.log('\n🎉 ObjectDocs initialized! You can now run:');
148-
console.log(' cd content && npm run dev - Start development server');
149-
console.log(' cd content && npm run build - Build for production\n');
150-
console.log('Or if you have npm scripts in your root package.json:');
151-
console.log(' npm run dev - Start development server');
152-
console.log(' npm run build - Build for production\n');
153-
} else {
154-
console.error('\n❌ Failed to install dependencies');
155-
process.exit(code);
156-
}
144+
// Wait for the install process to complete
145+
await new Promise((resolve, reject) => {
146+
installProcess.on('close', (code) => {
147+
if (code === 0) {
148+
console.log('\n✅ Dependencies installed successfully!');
149+
console.log('\n🎉 ObjectDocs initialized! You can now run:');
150+
console.log(' cd content && npm run dev - Start development server');
151+
console.log(' cd content && npm run build - Build for production\n');
152+
console.log('Or if you have npm scripts in your root package.json:');
153+
console.log(' npm run dev - Start development server');
154+
console.log(' npm run build - Build for production\n');
155+
resolve();
156+
} else {
157+
console.error('\n❌ Failed to install dependencies');
158+
reject(new Error(`Install failed with code ${code}`));
159+
}
160+
});
161+
162+
installProcess.on('error', (err) => {
163+
console.error('\n❌ Failed to start install process:', err.message);
164+
reject(err);
165+
});
157166
});
158167
});
159168
}

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)