Skip to content

Commit 59bb983

Browse files
committed
Contributing to Project X Documentation
1 parent 52f9eac commit 59bb983

File tree

3 files changed

+110
-68
lines changed

3 files changed

+110
-68
lines changed

docs/document/document.md

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,57 @@
44

55
## 改进文档
66

7-
Project X 的文档托管在 [GitHub](https://github.com/XTLS/Xray-docs-next).
7+
Project X 的文档托管在 [GitHub](https://github.com/XTLS/Xray-docs-next)
88

9-
您可以通过以下步骤, 提交您对文档的改动:
9+
您可以通过以下步骤, 提交您对文档的改动
1010

11-
1.[Project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 打开仓库, 点击右上角的 fork, fork 一份文档仓库的镜像到您自己的 github 仓库.
11+
1.[Project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 打开仓库点击右上角的 fork, fork 一份文档仓库的镜像到您自己的 GitHub 仓库
1212

13-
2. 使用任何您喜欢的工具, 从您克隆的仓库获得文档的克隆, 如:
13+
2. 对于简单的编辑您可直接在 GitHub 网页上完成;<br>
14+
但复杂的编辑请一定使用 VSCode, 从您克隆的仓库获得文档的克隆,如:
1415

15-
```
16-
git clone https://github.com/XTLS/Xray-docs-next.git
17-
```
16+
```bash
17+
git clone https://github.com/你的GitHub用户名/Xray-docs-next.git
18+
```
1819

19-
3. 基于 main 分支创建新的分支, 如:
20+
3. 基于 main 分支创建新的分支,如:
2021

21-
```
22-
git checkout -b your-branch
23-
```
22+
```bash
23+
git checkout -b your-branch
24+
```
2425

2526
4. 在新分支上做修改。
2627

27-
注:推荐 [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines)
28+
注:推荐使用自动格式 [prettier](https://prettier.io/docs/install)
29+
以及 [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines)
2830

29-
5. 修改完成后,请使用 [Prettier](https://prettier.io/docs/en/install.html) 格式化您的更改
31+
5. 修改完成后,VSCode 插件会自动格式化您的更改,本仓库已经预先配置好了所有 VSCode 所需插件您只要根据 VSCode 提示一键安装即可
3032

3133
注:存在格式问题的 PR,将有可能被拒绝。
3234

33-
6. 提交修改,并推送到您的仓库中
35+
6. 提交修改,并推送到您的仓库中
3436

35-
```
36-
git push -u origin your-branch
37-
```
37+
```bash
38+
git push -u origin your-branch
39+
```
3840

39-
6. 打开 GitHub, 点击 'Pull request' 向 [Project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 提交 PR。
41+
7. 打开 GitHub, 点击 'Pull request' 向 [project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 提交 PR。
4042

41-
7. 请在 PR 的标题和正文中,概述此次 PR 新增/修改的内容等;
43+
8. 请在 PR 的标题和正文中,概述此次 PR 新增/修改的内容等;
4244

43-
8. 等待回应, 如果 PR 被 merge, 您做的修改将直接呈现在 [Project X 文档网站](https://xtls.github.io)
45+
9. 等待回应, 如果 PR 被 merge, 您做的修改将直接呈现在 [Project X 文档网站](https://xtls.github.io)
46+
47+
10. 想在本地预览完整效果?
48+
1. 安装 [Node.JS](https://nodejs.org/zh-cn/download)
49+
2. 安装 [pnpm](https://pnpm.io/zh/installation)
50+
3. 重启 VSCode 并打开本项目
51+
4. 按下 `Ctrl` + `` ` `` 打开 VSCode 集成终端
52+
5. 在终端运行命令
53+
54+
```bash
55+
pnpm install
56+
pnpm run docs:dev
57+
```
4458

4559
## 发现问题?
4660

docs/en/document/document.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,60 @@
1-
# Contribute to Project X's Document
1+
# Contributing to Project X Documentation
22

3-
Contributions to Project X's Document are welcome, and we appreciate every Contributor's contribution! You guys make Xray stronger!
3+
Welcome to contribute to the Project X documentation. We appreciate every contributor! It is you who make Xray more powerful!
44

5-
## Improve Document
5+
## Improve the Documentation
66

7-
Document for Project X is hosted on [GitHub](https://github.com/XTLS/Xray-docs-next).
7+
Project X documentation is hosted on [GitHub](https://github.com/XTLS/Xray-docs-next).
88

9-
You can submit your changes to the Document by following these steps:
9+
You can submit your changes to the documentation by following these steps:
1010

11-
1. Open the repository from [Project X Document](https://github.com/XTLS/Xray-docs-next), click fork in the upper right corner, fork a mirror image of the document repository to your own GitHub repository.
11+
1. Open the [Project X Documentation Repository](https://github.com/XTLS/Xray-docs-next) and click **Fork** in the top right corner to fork a copy of the repository to your own GitHub account.
1212

13-
2. Get a clone of the docs from the repository you cloned using whatever tool you like, like:
13+
2. For simple edits, you can complete them directly on the GitHub website.<br>
14+
However, for complex edits, please use VSCode. Clone the documentation from your forked repository, for example:
1415

15-
```
16-
git clone https://github.com/XTLS/Xray-docs-next.git
17-
```
16+
```bash
17+
git clone [https://github.com/your-github-username/Xray-docs-next.git](https://github.com/your-github-username/Xray-docs-next.git)
18+
```
1819

19-
3. Create a new branch based on the main branch, such as:
20+
3. Create a new branch based on the `main` branch, for example:
2021

21-
```
22-
git checkout -b your-branch
23-
```
22+
```bash
23+
git checkout -b your-branch
24+
```
2425

25-
4. Make changes on the new branch.
26+
4. Make your changes on the new branch.
2627

27-
5. After modification, please use [Prettier](https://prettier.io/docs/en/install.html)Format your changes.
28+
Note: We recommend using automatic formatting with [prettier](https://prettier.io/docs/install) and following the [Google Developer Documentation Style Guide](https://developers.google.com/style).
2829

29-
Note: Pull requests with formatting issues may be rejected.
30+
5. After editing, VSCode extensions will automatically format your changes. This repository is pre-configured with all necessary VSCode extensions; simply follow the VSCode prompts to install them with one click.
3031

31-
6. Submit the changes and push them to your repository
32+
Note: PRs with formatting issues may be rejected.
3233

33-
```
34-
git push -u origin your-branch
35-
```
34+
6. Commit your changes and push them to your repository:
3635

37-
6. Open GitHub, click 'Pull request' to submit a pull request to [Project X Document](https://github.com/XTLS/Xray-docs-next).
36+
```bash
37+
git push -u origin your-branch
38+
```
3839

39-
7. Please outline the new/modified content of this pull request in the title and body of the pull request;
40+
7. Open GitHub and click **'Pull request'** to submit a PR to the [Project X Documentation Repository](https://github.com/XTLS/Xray-docs-next).
4041

41-
8. Waiting for a response, if the pull request is merged, your changes will be directly displayed on [Project X Document Website](https://xtls.github.io).
42+
8. Please summarize the additions/changes of this PR in the title and body.
4243

43-
## Found Problems?
44+
9. Wait for a response. If your PR is merged, your changes will appear directly on the [Project X Documentation Website](https://xtls.github.io).
4445

45-
If you find an error in the document, you can improve the documentation or submit an issue.
46+
10. Want to preview the full effect locally?
47+
1. Install [Node.JS](https://nodejs.org/en/download)
48+
2. Install [pnpm](https://pnpm.io/installation)
49+
3. Restart VSCode and open this project
50+
4. Press `Ctrl` + `` ` `` to open the VSCode integrated terminal
51+
5. Run the following commands in the terminal:
52+
53+
```bash
54+
pnpm install
55+
pnpm run docs:dev
56+
```
57+
58+
## Found an Issue?
59+
60+
If you find errors in the documentation, you can improve the documentation or submit an Issue.

docs/ru/document/document.md

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,60 @@
11
# Вклад в документацию Project X
22

3-
Мы приветствуем ваш вклад в документацию Project X и благодарим каждого контрибьютора за помощь! Вы делаете Xray лучше!
3+
Добро пожаловать в команду участников документации Project X. Мы ценим вклад каждого контрибьютора! Именно вы делаете Xray мощнее!
44

55
## Улучшение документации
66

77
Документация Project X размещена на [GitHub](https://github.com/XTLS/Xray-docs-next).
88

9-
Вы можете внести изменения в документацию, выполнив следующие действия:
9+
Вы можете внести свои изменения в документацию, выполнив следующие шаги:
1010

11-
1. Откройте [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next), нажмите кнопку "Fork" в правом верхнем углу, чтобы создать копию репозитория документации в вашей учетной записи GitHub.
11+
1. Откройте [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next) и нажмите **Fork** в правом верхнем углу, чтобы создать копию репозитория (зеркало) в вашем аккаунте GitHub.
1212

13-
2. Используйте любой удобный инструмент для клонирования документации из вашего репозитория, например:
13+
2. Простые правки можно внести прямо на веб-сайте GitHub.<br>
14+
Однако для сложных изменений обязательно используйте VSCode. Склонируйте документацию из вашего форка, например:
1415

15-
```
16-
git clone https://github.com/XTLS/Xray-docs-next.git
17-
```
16+
```bash
17+
git clone [https://github.com/ваше-имя-пользователя/Xray-docs-next.git](https://github.com/ваше-имя-пользователя/Xray-docs-next.git)
18+
```
1819

1920
3. Создайте новую ветку на основе ветки `main`, например:
2021

21-
```
22-
git checkout -b your-branch
23-
```
22+
```bash
23+
git checkout -b your-branch
24+
```
2425

25-
4. Внесите изменения в новую ветку.
26+
4. Внесите изменения в новой ветке.
2627

27-
Примечание: рекомендуем придерживаться [Руководства по оформлению текстов на китайском языке](https://github.com/sparanoid/chinese-copywriting-guidelines) (на китайском).
28+
Примечание: Рекомендуется использовать автоформатирование [prettier](https://prettier.io/docs/install), а также придерживаться [информационного стиля (Главред)](https://glvrd.ru/) для ясности текста.
2829

29-
5. После внесения изменений отформатируйте их с помощью [Prettier](https://prettier.io/docs/en/install.html).
30+
5. После завершения редактирования плагин VSCode автоматически отформатирует ваши изменения. В этом репозитории уже предварительно настроены все необходимые плагины для VSCode; вам нужно лишь установить их одним нажатием, следуя подсказкам VSCode.
3031

31-
Примечание: запросы на включение (PR) с ошибками форматирования могут быть отклонены.
32+
Примечание: PR с проблемами форматирования могут быть отклонены.
3233

33-
6. Зафиксируйте изменения и отправьте их в ваш репозиторий:
34+
6. Зафиксируйте (commit) изменения и отправьте (push) их в свой репозиторий:
3435

35-
```
36-
git push -u origin your-branch
37-
```
36+
```bash
37+
git push -u origin your-branch
38+
```
3839

39-
7. Откройте GitHub, перейдите в раздел "Pull requests" и создайте новый запрос на включение (PR) в [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next).
40+
7. Откройте GitHub и нажмите **'Pull request'**, чтобы отправить PR в [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next).
4041

41-
8. В заголовке и описании PR кратко опишите внесенные изменения.
42+
8. Пожалуйста, в заголовке и тексте PR кратко опишите добавленный или измененный контент.
4243

43-
9. Дождитесь ответа. Если ваш PR будет принят, изменения появятся на [сайте документации Project X](https://xtls.github.io).
44+
9. Ожидайте ответа. Если PR будет принят (merge), ваши изменения появятся непосредственно на [сайте документации Project X](https://xtls.github.io).
45+
46+
10. Хотите предварительно просмотреть полный результат локально?
47+
1. Установите [Node.JS](https://nodejs.org/en/download)
48+
2. Установите [pnpm](https://pnpm.io/installation)
49+
3. Перезапустите VSCode и откройте этот проект
50+
4. Нажмите `Ctrl` + `` ` `` чтобы открыть встроенный терминал VSCode
51+
5. Запустите следующие команды в терминале:
52+
53+
```bash
54+
pnpm install
55+
pnpm run docs:dev
56+
```
4457

4558
## Нашли ошибку?
4659

47-
Если вы обнаружили ошибку в документации, вы можете внести исправления или создать задачу (Issue).
60+
Если вы обнаружили ошибку в документации, вы можете улучшить её самостоятельно или создать Issue.

0 commit comments

Comments
 (0)