|
1 | | -# docs |
| 1 | +# ObjectStack Documentation |
2 | 2 |
|
3 | | -A multi-language documentation site built with Fumadocs, supporting English and Chinese. |
| 3 | +The official documentation for ObjectStack, built with Next.js (App Router) and [Fumadocs](https://fumadocs.vercel.app). |
| 4 | + |
| 5 | +## Project Structure |
| 6 | + |
| 7 | +This repository contains the documentation for: |
| 8 | +- **ObjectStack Platform**: The core development platform. |
| 9 | +- **ObjectQL**: The backend data protocol engine. |
| 10 | +- **ObjectUI**: The declarative UI engine. |
| 11 | +- **ObjectOS**: The runtime operating system. |
4 | 12 |
|
5 | 13 | ## Features |
6 | 14 |
|
7 | | -- 🌍 **Multi-language Support**: Full internationalization with English (en) and Chinese (zh-CN) |
8 | | -- 📝 **MDX Content**: Write documentation using MDX for interactive content |
9 | | -- 🔍 **Fast Search**: Quick search across all documentation |
10 | | -- 🎨 **Modern UI**: Beautiful and responsive design with Fumadocs UI |
11 | | -- 📱 **Mobile Friendly**: Fully responsive on all devices |
| 15 | +- 🌍 **Multi-language Support**: |
| 16 | + - Source: English (`content/docs`) |
| 17 | + - Target: Chinese (`content/docs-zh-CN`) - *Auto-translated via AI* |
| 18 | +- 📝 **MDX Content**: Interactive documentation with Type-safe components. |
| 19 | +- 🛠️ **Automated Workflows**: |
| 20 | + - AI Translation CLI (`packages/docs-cli`) |
| 21 | + - Broken link checking |
| 22 | + - SEO optimization |
12 | 23 |
|
13 | 24 | ## Getting Started |
14 | 25 |
|
15 | | -### Installation |
| 26 | +### Prerequisites |
16 | 27 |
|
17 | | -```bash |
18 | | -npm install |
19 | | -``` |
| 28 | +- Node.js 18+ |
| 29 | +- pnpm |
20 | 30 |
|
21 | | -After cloning the repository, configure the Git merge driver for `pnpm-lock.yaml`: |
| 31 | +### Installation |
22 | 32 |
|
23 | 33 | ```bash |
24 | | -git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver" |
25 | | -git config merge.pnpm-merge.driver "pnpm install" |
| 34 | +pnpm install |
26 | 35 | ``` |
27 | 36 |
|
28 | | -This helps avoid merge conflicts in the lock file by automatically regenerating it during merges. |
29 | | - |
30 | 37 | ### Development |
31 | 38 |
|
| 39 | +Start the development server: |
| 40 | + |
32 | 41 | ```bash |
33 | | -npm run dev |
| 42 | +pnpm run dev |
34 | 43 | ``` |
35 | 44 |
|
36 | | -Visit `http://localhost:3000` to view the documentation site. |
| 45 | +Visit `http://localhost:3000` to view the documentation. |
37 | 46 |
|
38 | | -### Build |
| 47 | +## Writing Documentation |
39 | 48 |
|
40 | | -```bash |
41 | | -npm run build |
42 | | -``` |
| 49 | +1. Create new MDX files in `content/docs`. |
| 50 | +2. Update `meta.json` in the corresponding directory. |
| 51 | +3. Commit your changes (CI will handle translation). |
| 52 | + |
| 53 | +### CLI Tools |
43 | 54 |
|
44 | | -### Production |
| 55 | +We provide a custom CLI for translation tasks: |
45 | 56 |
|
46 | 57 | ```bash |
47 | | -npm start |
| 58 | +# Translate all files |
| 59 | +pnpm docs-cli translate --all |
48 | 60 | ``` |
49 | 61 |
|
50 | | -## Building Multi-language Documentation |
51 | 62 |
|
52 | 63 | For a comprehensive guide on how to build and maintain multi-language documentation, see the [Multi-language Documentation Guide](content/docs/i18n-guide.en.mdx) available in the documentation: |
53 | 64 |
|
|
0 commit comments