You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -45,7 +45,7 @@ Then initialize a configuration file `doom.config.yml`:
45
45
title: My Docs
46
46
```
47
47
48
-
Also create a `tsconfig.json` file with the following content:
48
+
Also create `tsconfig.json` with the following content:
49
49
50
50
```jsonc
51
51
{
@@ -72,7 +72,7 @@ Finally, create a `global.d.ts` file with the following content:
72
72
/// <reference types="@alauda/doom/runtime" />
73
73
```
74
74
75
-
This allows you to safely use the global components provided by doom with type safety in `.mdx` files.
75
+
This allows you to safely use the global components provided by doom in `.mdx` files with type safety.
76
76
77
77
## CLI Tool \{#cli}
78
78
@@ -121,7 +121,7 @@ For more configuration, please refer to [Configuration](./usage/configuration)
121
121
122
122
### Starting the Development Server \{#dev}
123
123
124
-
Run `yarn dev` to start the development server, the browser will automatically open the documentation homepage.
124
+
Run `yarn dev` to start the development server; the browser will automatically open the documentation homepage.
125
125
126
126
```sh
127
127
doom dev -h
@@ -148,11 +148,11 @@ Run `yarn build` to build the production code. After building, static files will
148
148
149
149
### Local Preview \{#serve}
150
150
151
-
Run `yarn serve` to preview the built static files. Note that if you used `-b` or `-p` parameters during build, you need to use the same `-b` and`-p` parameters during preview.
151
+
Run `yarn serve` to preview the built static files. Note that if you used `-b`, `-p` parameters during build, you need to use the same `-b`,`-p` parameters during preview.
152
152
153
153
### Using Scaffolding Templates \{#new}
154
154
155
-
Run `yarn new` to generate projects, modules, or documentation using scaffolding templates.
155
+
Run `yarn new` to generate projects, modules, or documentation from scaffolding templates.
156
156
157
157
### Translating Documentation \{#translate}
158
158
@@ -175,24 +175,24 @@ Options:
175
175
-h, --help display helpforcommand
176
176
```
177
177
178
-
- The `-g, --glob` parameter is required and can specify the directories or paths of files to translate, supporting `glob` syntax. Note that the parameter value must be quoted to avoid unexpected behavior caused by command line parsing. Examples:
178
+
- The `-g, --glob` parameter is required and specifies the directories or files to translate, supporting `glob` syntax. Note that the parameter value must be quoted to avoid unexpected behavior from the shell. Examples:
179
179
1.`yarn translate -g abc xyz` will translate all documents under `<root>/<source>/abc` and `<root>/<source>/xyz` to `<root>/<target>/abc` and `<root>/<target>/xyz` respectively.
180
-
2.`yarn translate -g '*'` will translate all document files under `<root>/<source>`.
181
-
- The `-C, --copy` parameter is optional. It determines whether to copy local asset files to the target directory when the target file does not exist. The default is `false`, which means changing the asset reference path to the source path. Examples:
182
-
- When this parameter is enabled:
183
-
1.When translating `/<source>/abc.jpg`, it will copy `<root>/public/<source>/abc.jpg` to `<root>/public/<target>/abc.jpg` and modify the reference path in the document to `/<target>/abc.jpg`.
184
-
2.For`<root>/<source>/abc.mdx` documents referencing `./assets/xyz.jpg`, it will copy `<root>/<source>/assets/xyz.jpg` to `<root>/<target>/assets/xyz.jpg`, and the image reference path remains unchanged.
185
-
3.For`<root>/<source>/abc.mdx` documents referencing `./assets/<source>/xyz.jpg`, it will copy `<root>/<source>/assets/<source>/xyz.jpg` to `<root>/<target>/assets/<target>/xyz.jpg` and modify the reference path in the document to `./assets/<target>/xyz.jpg`.
186
-
- When this parameter is not enabled:
187
-
1.When translating `/<source>/abc.jpg`, if `<root>/public/<target>/abc.jpg` exists, the reference path in the document will be changed to `/<target>/abc.jpg`; otherwise, the image reference path remains unchanged.
188
-
2.For`<root>/<source>/abc.mdx` documents referencing `./assets/<source>/xyz.jpg`, if `<root>/<target>/assets/<target>/xyz.jpg` exists, the reference path will be changed to `./assets/<target>/xyz.jpg`; otherwise, it will be changed to `../<source>/assets/<target>/xyz.jpg`.
180
+
2.`yarn translate -g '*'` will translate all documents under `<root>/<source>`.
181
+
- The `-C, --copy` parameter is optional and controls whether to copy local asset files to the target directory when the target file does not exist. The default is `false`, which changes the asset reference paths to the source paths. Examples:
182
+
- When enabled:
183
+
1.`/<source>/abc.jpg`will copy `<root>/public/<source>/abc.jpg` to `<root>/public/<target>/abc.jpg` and update the document reference path to `/<target>/abc.jpg`.
184
+
2.In`<root>/<source>/abc.mdx`, a reference to `./assets/xyz.jpg`will copy `<root>/<source>/assets/xyz.jpg` to `<root>/<target>/assets/xyz.jpg`, keeping the image reference path unchanged.
185
+
3.In`<root>/<source>/abc.mdx`, a reference to `./assets/<source>/xyz.jpg`will copy `<root>/<source>/assets/<source>/xyz.jpg` to `<root>/<target>/assets/<target>/xyz.jpg` and update the document reference path to `./assets/<target>/xyz.jpg`.
186
+
- When not enabled:
187
+
1.For `/<source>/abc.jpg`, if `<root>/public/<target>/abc.jpg` exists, the document reference path will be updated to `/<target>/abc.jpg`; otherwise, the image reference path remains unchanged.
188
+
2.In`<root>/<source>/abc.mdx`, if `<root>/<target>/assets/<target>/xyz.jpg` exists, the reference path will be updated to `./assets/<target>/xyz.jpg`; otherwise, it will be changed to `../<source>/assets/<target>/xyz.jpg`.
189
189
190
190
:::warning
191
191
Specifically, if you use `-g '*'` for full translation, the file lists of `source` and `target` directories will be compared, and unmatched `target` files except for `internalRoutes` will be automatically deleted.
192
192
:::
193
193
194
194
:::tip
195
-
The translation feature requires configuring the `AZURE_OPENAI_API_KEY`environment variable locally. Please contact your team leader to obtain it.
195
+
The translation feature requires the local environment variable `AZURE_OPENAI_API_KEY`to be configured. Please contact your team leader to obtain it.
196
196
:::
197
197
198
198
You can control translation behavior in the document metadata:
@@ -201,7 +201,7 @@ You can control translation behavior in the document metadata:
201
201
i18n:
202
202
title:
203
203
en: DevOps Connectors
204
-
additionalPrompts: 'The Connectors in this document are proper nouns and should not be translated'
204
+
additionalPrompts: 'The term Connectors in this document is a proper noun and should not be translated'
205
205
disableAutoTranslation: false
206
206
title: DevOps Connectors
207
207
```
@@ -211,7 +211,7 @@ For more configuration, please refer to [Translation Configuration](./usage/conf
211
211
### Exporting PDF \{#export}
212
212
213
213
:::warning
214
-
Please run `yarn build` before executing the export operation.
214
+
Please run `yarn build` before performing the export operation.
215
215
:::
216
216
217
217
```sh
@@ -231,9 +231,9 @@ Options:
231
231
-h, --help display help for command
232
232
```
233
233
234
-
Run `yarn export` to export the documentation as a PDF file. Note that if you used `-b` or `-p` parameters during build, you need to use the same `-b` and`-p` parameters during export.
234
+
Run `yarn export` to export the documentation as PDF files. Note that if you used `-b`, `-p` parameters during build, you need to use the same `-b`,`-p` parameters during export.
235
235
236
-
The export feature depends on [`playwright`](https://playwright.dev). For CI pipelines, please use `build-harbor.alauda.cn/frontend/playwright-runner:doom` as the base image for dependency installation and documentation build. Locally, you can set the following environment variable to speed up downloads:
236
+
The export feature depends on [`playwright`](https://playwright.dev). For CI pipelines, please use `build-harbor.alauda.cn/frontend/playwright-runner:doom` as the base image for dependency installation and documentation building. Locally, you can set the following environment variable to speed up downloads:
We also agree that the `.cspell` folder in the current working directory (`CWD`) is used to store CSpell dictionary files. For example, you can create `.cspell/k8s.txt`:
275
+
We also agree that the `.cspell` folder under the current working directory (`CWD`) is used to store CSpell dictionary files. For example, you can create `.cspell/k8s.txt`:
Следующие спецификации должны быть соблюдены в процессе перевода для интернационализации:
15
+
Следующие требования должны соблюдаться в процессе перевода для интернационализации:
16
16
17
-
- Структура директорий многоязычных документов (`doc/en`) должна быть идентична документам в директории`doc/zh`, что обеспечит точное совпадение ссылок на многоязычные документы за исключением идентификатора языка.
17
+
- Структура каталогов многоязычных документов (`doc/en`) должна быть идентична структуре документов в каталоге`doc/zh`, обеспечивая, что ссылки на многоязычные документы будут точно такими же, за исключением идентификатора языка.
18
18
19
19
::: danger
20
-
Если для перевода используется инструмент автоматического перевода, нет необходимости беспокоиться об этом вопросе, так как инструмент автоматического перевода автоматически сгенерирует структуру директорий для документов целевого языка на основе `doc/zh`.
20
+
Если для перевода используется автоматический инструмент перевода, беспокоиться об этом не нужно, так как автоматический инструмент перевода автоматически создаст структуру каталогов для документов целевого языка на основе `doc/zh`.
0 commit comments