blob: f4e75636711affd26031039de7b9f7219cdd1cf0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
# DropOut Documentation
This is the official documentation site for DropOut Minecraft Launcher, built with [Fumadocs](https://fumadocs.dev) and React Router v7.
## Overview
The documentation covers:
- **Getting Started**: Installation and first-time setup
- **Features**: Detailed guides for all launcher features
- **Architecture**: Technical design and implementation details
- **Development**: Building and contributing to DropOut
- **Troubleshooting**: Common issues and solutions
### Multi-language Support
The documentation is available in:
- **English** (default) - `content/docs/en/`
- **简体中文** (Simplified Chinese) - `content/docs/zh/`
## Development
### Prerequisites
- Node.js 22+
- pnpm 9+
### Setup
Install dependencies:
```bash
pnpm install
```
### Run Development Server
```bash
pnpm dev
```
This starts the development server at `http://localhost:5173` with hot reload enabled.
The documentation automatically supports language switching between English and Chinese.
### Build for Production
```bash
pnpm build
```
The production build will be output to the `build/` directory.
### Type Checking
```bash
pnpm types:check
```
### Linting and Formatting
```bash
# Check code
pnpm lint
# Format code
pnpm format
```
## Project Structure
```bash
packages/docs/
├── content/
│ └── docs/ # Documentation content (MDX)
│ ├── en/ # English documentation
│ │ ├── index.mdx
│ │ ├── getting-started.mdx
│ │ ├── architecture.mdx
│ │ ├── development.mdx
│ │ ├── troubleshooting.mdx
│ │ └── features/
│ └── zh/ # Chinese documentation
│ ├── index.mdx
│ ├── getting-started.mdx
│ ├── architecture.mdx
│ ├── development.mdx
│ ├── troubleshooting.mdx
│ └── features/
├── app/ # React Router app
├── public/ # Static assets
├── source.config.ts # Fumadocs configuration (i18n enabled)
└── react-router.config.ts # React Router configuration
```
## Internationalization (i18n)
### Structure
Documentation is organized by locale:
- English: `content/docs/en/`
- Chinese: `content/docs/zh/`
Each locale has the same structure with translated content.
### Configuration
i18n is configured in:
- `source.config.ts`: Enables i18n support
- `app/lib/source.ts`: Defines available languages and default
### Adding a New Language
1. Create a new directory: `content/docs/{locale}/`
2. Copy the structure from `en/` or `zh/`
3. Translate all `.mdx` files
4. Update `meta.json` files with translated titles
5. Add the language to `app/lib/source.ts`
## Writing Documentation
### MDX Format
All documentation is written in MDX (Markdown with JSX):
```mdx
---
title: Page Title
description: Page description for SEO
---
# Page Title
Content goes here...
<Cards>
<Card title="Link Title" href="/path" />
</Cards>
```
### Available Components
Fumadocs provides several components:
- `<Card>` - Link cards
- `<Cards>` - Card container
- `<Callout>` - Info/warning boxes
- `<Tabs>` - Tabbed content
- `<Steps>` - Numbered steps
- Code blocks with syntax highlighting
### Adding New Pages
1. Create new `.mdx` file in `content/docs/{locale}/`
2. Add frontmatter with title and description
3. Write content using MDX
4. Update `meta.json` to include the page
5. Repeat for all supported languages
6. Test locally with `pnpm dev`
### Translation Guidelines
When translating content:
- Keep all code blocks in English
- Translate frontmatter (title, description)
- Keep technical terms (Tauri, Rust, Svelte, etc.) in English
- Translate UI elements and descriptions
- Keep all links and URLs unchanged
- Maintain the same structure and formatting
### Organizing Content
Use `meta.json` files to organize navigation:
```json
{
"title": "Section Title",
"pages": [
"page1",
"page2",
{
"title": "Subsection",
"pages": ["sub1", "sub2"]
}
]
}
```
## Deployment
The documentation is automatically deployed when changes are merged to the main branch.
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes (in all supported languages)
4. Test locally
5. Submit a pull request
## Links
- [DropOut Repository](https://github.com/HydroRoll-Team/DropOut)
- [Fumadocs](https://fumadocs.dev)
- [React Router](https://reactrouter.com)
## License
MIT License - see the main repository for details.
|