File tree Expand file tree Collapse file tree 4 files changed +44
-4
lines changed
Expand file tree Collapse file tree 4 files changed +44
-4
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,20 @@ Add the following scripts to your `package.json`:
8080}
8181```
8282
83- ### 3. Add content
83+ ### 3. Initialize ObjectDocs
84+
85+ Run the init command to set up the site engine:
86+
87+ ``` bash
88+ pnpm objectdocs init
89+ ```
90+
91+ This will:
92+ - Copy the site engine to ` content/.objectdocs `
93+ - Install necessary dependencies
94+ - Prepare your project for development
95+
96+ ### 4. Add content
8497
8598Create the basic directory structure:
8699
@@ -109,7 +122,7 @@ Create `content/docs/meta.json`:
109122}
110123```
111124
112- ### 4 . Start the server
125+ ### 5 . Start the server
113126
114127``` bash
115128pnpm dev
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ This starter template serves multiple purposes:
2323```
2424examples/starter/
2525├── content/
26+ │ ├── .objectdocs/ # Site engine (created by init command)
2627│ ├── docs.site.json # Global site configuration
2728│ └── docs/
2829│ ├── meta.json # Sidebar navigation structure
@@ -55,7 +56,18 @@ cd examples/starter
5556pnpm install
5657```
5758
58- This will install ` @objectdocs/cli ` from the workspace, which in turn will use ` @objectdocs/site ` as a dependency.
59+ This will install ` @objectdocs/cli ` from the workspace.
60+
61+ 3 . Initialize ObjectDocs:
62+
63+ ``` bash
64+ pnpm objectdocs init
65+ ```
66+
67+ This command will:
68+ - Copy the ` @objectdocs/site ` engine to ` content/.objectdocs `
69+ - Install necessary dependencies
70+ - Prepare your project for development
5971
6072### Development
6173
@@ -139,6 +151,7 @@ For more details on Vercel deployment, see [VERCEL.md](./VERCEL.md).
139151Use this checklist to validate the starter works correctly:
140152
141153- [ ] ` pnpm install ` completes without errors
154+ - [ ] ` pnpm objectdocs init ` initializes the site successfully
142155- [ ] ` pnpm dev ` starts the development server
143156- [ ] All pages load correctly in the browser
144157- [ ] Navigation works (sidebar, header links)
Original file line number Diff line number Diff line change @@ -23,6 +23,20 @@ pnpm install
2323
2424## Usage
2525
26+ ### Initialize Site
27+
28+ Before using the development or build commands, you need to initialize the site:
29+
30+ ``` bash
31+ # Initialize ObjectDocs site in content/.objectdocs
32+ pnpm objectdocs init
33+ ```
34+
35+ This command:
36+ - Copies the ` @objectdocs/site ` package to ` content/.objectdocs `
37+ - Installs necessary dependencies
38+ - Prepares your project for local development
39+
2640### Site Management
2741
2842The CLI can also be used to run the documentation site locally with a VitePress-like experience.
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export function registerInitCommand(cli) {
6969 console . log ( '📦 Installing dependencies...\n' ) ;
7070
7171 const npmCmd = process . platform === 'win32' ? 'npm.cmd' : 'npm' ;
72- const installProcess = spawn ( npmCmd , [ 'install' ] , {
72+ const installProcess = spawn ( npmCmd , [ 'install' , '--legacy-peer-deps' ] , {
7373 cwd : targetDir ,
7474 stdio : 'inherit'
7575 } ) ;
You can’t perform that action at this time.
0 commit comments