Skip to content

Commit c67fab9

Browse files
committed
重构文档结构,删除旧的README和指南文件,添加新的用户和开发者指南以及协议规范文档
1 parent baf20c4 commit c67fab9

File tree

5 files changed

+72
-4
lines changed

5 files changed

+72
-4
lines changed

docs/.vitepress/config.mts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
4+
title: "ObjectQL",
5+
description: "A Unified Data Management Framework",
6+
7+
// Scans the docs directory
8+
srcDir: '.',
9+
10+
themeConfig: {
11+
// Top Navigation
12+
nav: [
13+
{ text: 'Guide', link: '/guide/' },
14+
{ text: 'Specifications', link: '/spec/' },
15+
{ text: 'AI Context', link: '/AI_CONTEXT' }
16+
],
17+
18+
// Sidebar Configuration
19+
sidebar: {
20+
// Sidebar for Guide section
21+
'/guide/': [
22+
{
23+
text: 'Getting Started',
24+
items: [
25+
{ text: 'Introduction', link: '/guide/' },
26+
{ text: 'Data Modeling', link: '/guide/data-modeling' },
27+
{ text: 'Security Guide', link: '/guide/security-guide' }
28+
]
29+
},
30+
{
31+
text: 'Server-Side Logic',
32+
items: [
33+
{ text: 'SDK Reference', link: '/guide/sdk-reference' },
34+
{ text: 'Writing Hooks', link: '/guide/logic-hooks' },
35+
{ text: 'Hooks Examples', link: '/guide/logic-hooks-examples' },
36+
{ text: 'Custom Actions', link: '/guide/logic-actions' }
37+
]
38+
}
39+
],
40+
41+
// Sidebar for Spec section
42+
'/spec/': [
43+
{
44+
text: 'Protocol Specifications',
45+
items: [
46+
{ text: 'Overview', link: '/spec/' },
47+
{ text: 'Metadata Format', link: '/spec/metadata-format' },
48+
{ text: 'Query Language', link: '/spec/query-language' },
49+
{ text: 'HTTP Protocol', link: '/spec/http-protocol' }
50+
]
51+
}
52+
]
53+
},
54+
55+
socialLinks: [
56+
{ icon: 'github', link: 'https://github.com/objectql/objectql' }
57+
],
58+
59+
footer: {
60+
message: 'Released under the MIT License.',
61+
copyright: 'Copyright © 2026 ObjectQL'
62+
}
63+
}
64+
})
File renamed without changes.

docs/README.md renamed to docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
We have organized the documentation into two main categories:
44

5-
## 1. [User & Developer Guide](./guide/README.md)
5+
## 1. [User & Developer Guide](./guide/)
66
**Target Audience**: Application Developers, Customer Success, End Users.
77
**Content**:
88
* How to model data (Objects, Fields, Relationships).
99
* How to write business logic (Hooks, Actions).
1010
* Using the Node.js SDK.
1111
* Security configuration.
1212

13-
## 2. [Protocol Specifications](./spec/README.md)
13+
## 2. [Protocol Specifications](./spec/)
1414
**Target Audience**: System Architects, Driver Contributors, Integrators.
1515
**Content**:
1616
* Metadata File Format Specification (YAML/JSON schema).
File renamed without changes.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"test": "npm run test --workspaces",
1515
"changeset": "changeset",
1616
"version": "changeset version",
17-
"release": "npm run build && changeset publish"
17+
"release": "npm run build && changeset publish",
18+
"docs:dev": "vitepress dev docs",
19+
"docs:build": "vitepress build docs",
20+
"docs:preview": "vitepress preview docs"
1821
},
1922
"devDependencies": {
2023
"@changesets/cli": "^2.29.8",
@@ -26,7 +29,8 @@
2629
"js-yaml": "^4.1.1",
2730
"supertest": "^7.2.2",
2831
"ts-jest": "^29.4.6",
29-
"typescript": "^5.3.0"
32+
"typescript": "^5.3.0",
33+
"vitepress": "^1.6.4"
3034
},
3135
"version": "0.1.0"
3236
}

0 commit comments

Comments
 (0)