Skip to content

Commit 4d6149c

Browse files
authored
chore(deps): bump rspress to v2.0.0-beta.22 (#143)
1 parent 818434f commit 4d6149c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+430
-424
lines changed

.changeset/quick-dryers-burn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@alauda/doom": patch
3+
---
4+
5+
chore(deps): bump rspress to v2.0.0-beta.22

docs/en/start.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sourceSHA: e22f8a9da520d8a45867b9da3ba498f4884f9c4cc937fa5b9fc54a80a1bc391a
2+
sourceSHA: c33b80ecb945eca19b9040fa109dc33441d5a634de9ddd1d2e9247ea469a9569
33
---
44

55
# Getting Started \{#start}
@@ -19,7 +19,7 @@ Run `npm init -y` to initialize a project. You can install doom using npm, yarn,
1919
Then create files with the following commands:
2020

2121
```bash
22-
# Create docs directories, with default support for bilingual Chinese and English
22+
# Create docs directories, default supports bilingual Chinese and English
2323
mkdir docs/en && echo '# Hello World' > docs/en/index.md
2424
mkdir docs/zh && echo '# 你好世界' > docs/zh/index.md
2525
```
@@ -72,7 +72,7 @@ Finally, create a `global.d.ts` file with the following content:
7272
/// <reference types="@alauda/doom/runtime" />
7373
```
7474

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.
7676

7777
## CLI Tool \{#cli}
7878

@@ -175,20 +175,20 @@ Options:
175175
-h, --help display help for command
176176
```
177177

178-
- The `-g, --glob` parameter is required and can specify the directories or 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. You 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 from the command line parser. Examples:
179179
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.
180180
2. `yarn translate -g '*'` will translate all document files 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 means changing the asset reference path to the source path. Examples:
181+
- The `-C, --copy` parameter is optional. It controls 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:
182182
- When this parameter is enabled:
183-
1. When translating `/<source>/abc.jpg`, `<root>/public/<source>/abc.jpg` will be copied to `<root>/public/<target>/abc.jpg`, and the reference path in the document will be changed to `/<target>/abc.jpg`.
184-
2. For `./assets/xyz.jpg` in `<root>/<source>/abc.mdx`, the file `<root>/<source>/assets/xyz.jpg` will be copied to `<root>/<target>/assets/xyz.jpg`, and the image reference path remains unchanged.
185-
3. For `./assets/<source>/xyz.jpg` in `<root>/<source>/abc.mdx`, the file `<root>/<source>/assets/<source>/xyz.jpg` will be copied to `<root>/<target>/assets/<target>/xyz.jpg`, and the reference path in the document will be changed to `./assets/<target>/xyz.jpg`.
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, references like `./assets/xyz.jpg` 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, references like `./assets/<source>/xyz.jpg` 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`.
186186
- When this parameter is not enabled:
187187
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 `./assets/<source>/xyz.jpg` in `<root>/<source>/abc.mdx`, if `<root>/<target>/assets/<target>/xyz.jpg` exists, the reference path in the document will be changed to `./assets/<target>/xyz.jpg`; otherwise, it will be changed to `../<source>/assets/<target>/xyz.jpg`.
188+
2. For `<root>/<source>/abc.mdx` documents, references like `./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`.
189189

190190
:::warning
191-
Specifically, if you use `-g '*'` for full translation, the file lists of the `source` and `target` directories will be compared, and unmatched `target` files except for `internalRoutes` will be automatically deleted.
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.
192192
:::
193193

194194
:::tip
@@ -211,7 +211,7 @@ For more configuration, please refer to [Translation Configuration](./usage/conf
211211
### Exporting PDF \{#export}
212212
213213
:::warning
214-
Please run the `yarn build` command before exporting.
214+
Please run the `yarn build` command before performing the export operation.
215215
:::
216216

217217
```sh
@@ -233,13 +233,13 @@ Options:
233233

234234
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.
235235

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:
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:
237237

238238
```dotenv title=".env.yarn"
239239
PLAYWRIGHT_DOWNLOAD_HOST="https://cdn.npmmirror.com/binaries/playwright"
240240
```
241241

242-
In addition to exporting a complete PDF document for the entire site, `doom` also supports exporting a single PDF file for a specified entry. For more configuration, please refer to [Documentation Export Configuration](./usage/configuration#export)
242+
Besides exporting a full-site unified PDF document, `doom` also supports exporting a single PDF file by specifying an entry point. For more configuration, please refer to [Document Export Configuration](./usage/configuration#export)
243243

244244
### Documentation Linting \{#lint}
245245

@@ -260,7 +260,7 @@ Options:
260260
-h, --help display help for command
261261
```
262262

263-
`doom lint` is based on [`ESLint`](https://eslint.org/) and [`cspell`](https://cspell.org/). For a better experience in your editor, you can install the corresponding plugins [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) / [CSpell](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker), then create the corresponding configuration files:
263+
`doom lint` is based on [`ESLint`](https://eslint.org/) and [`cspell`](https://cspell.org/). For a better experience in editors, you can install the corresponding plugins [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) / [CSpell](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker), then create the corresponding configuration files:
264264

265265
- `eslint.config.mjs`:
266266

@@ -276,7 +276,7 @@ Options:
276276
export { default } from '@alauda/doom/cspell'
277277
```
278278
279-
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`:
279+
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`:
280280
281281
```txt
282282
k8s

0 commit comments

Comments
 (0)