mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-09-25 07:48:07 +03:00
Contributing to Project X Documentation
This commit is contained in:
+34
-20
@@ -4,43 +4,57 @@
|
||||
|
||||
## 改进文档
|
||||
|
||||
Project X 的文档托管在 [GitHub](https://github.com/XTLS/Xray-docs-next) 上.
|
||||
Project X 的文档托管在 [GitHub](https://github.com/XTLS/Xray-docs-next) 上。
|
||||
|
||||
您可以通过以下步骤, 提交您对文档的改动:
|
||||
您可以通过以下步骤, 提交您对文档的改动:
|
||||
|
||||
1. 从 [Project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 打开仓库, 点击右上角的 fork, fork 一份文档仓库的镜像到您自己的 github 仓库.
|
||||
1. 从 [Project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 打开仓库,点击右上角的 fork, fork 一份文档仓库的镜像到您自己的 GitHub 仓库。
|
||||
|
||||
2. 使用任何您喜欢的工具, 从您克隆的仓库获得文档的克隆, 如:
|
||||
2. 对于简单的编辑您可直接在 GitHub 网页上完成;<br>
|
||||
但复杂的编辑请一定使用 VSCode, 从您克隆的仓库获得文档的克隆,如:
|
||||
|
||||
```
|
||||
git clone https://github.com/XTLS/Xray-docs-next.git
|
||||
```
|
||||
```bash
|
||||
git clone https://github.com/你的GitHub用户名/Xray-docs-next.git
|
||||
```
|
||||
|
||||
3. 基于 main 分支创建新的分支, 如:
|
||||
3. 基于 main 分支创建新的分支,如:
|
||||
|
||||
```
|
||||
git checkout -b your-branch
|
||||
```
|
||||
```bash
|
||||
git checkout -b your-branch
|
||||
```
|
||||
|
||||
4. 在新分支上做修改。
|
||||
|
||||
注:推荐 [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines)
|
||||
注:推荐使用自动格式 [prettier](https://prettier.io/docs/install)
|
||||
以及 [中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines)
|
||||
|
||||
5. 修改完成后,请使用 [Prettier](https://prettier.io/docs/en/install.html) 格式化您的更改。
|
||||
5. 修改完成后,VSCode 插件会自动格式化您的更改,本仓库已经预先配置好了所有 VSCode 所需插件您只要根据 VSCode 提示一键安装即可。
|
||||
|
||||
注:存在格式问题的 PR,将有可能被拒绝。
|
||||
|
||||
6. 提交修改,并推送到您的仓库中
|
||||
6. 提交修改,并推送到您的仓库中:
|
||||
|
||||
```
|
||||
git push -u origin your-branch
|
||||
```
|
||||
```bash
|
||||
git push -u origin your-branch
|
||||
```
|
||||
|
||||
6. 打开 GitHub, 点击 'Pull request' 向 [Project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 提交 PR。
|
||||
7. 打开 GitHub, 点击 'Pull request' 向 [project X 文档仓库](https://github.com/XTLS/Xray-docs-next) 提交 PR。
|
||||
|
||||
7. 请在 PR 的标题和正文中,概述此次 PR 新增/修改的内容等;
|
||||
8. 请在 PR 的标题和正文中,概述此次 PR 新增/修改的内容等;
|
||||
|
||||
8. 等待回应, 如果 PR 被 merge, 您做的修改将直接呈现在 [Project X 文档网站](https://xtls.github.io)。
|
||||
9. 等待回应, 如果 PR 被 merge, 您做的修改将直接呈现在 [Project X 文档网站](https://xtls.github.io)。
|
||||
|
||||
10. 想在本地预览完整效果?
|
||||
1. 安装 [Node.JS](https://nodejs.org/zh-cn/download)
|
||||
2. 安装 [pnpm](https://pnpm.io/zh/installation)
|
||||
3. 重启 VSCode 并打开本项目
|
||||
4. 按下 `Ctrl` + `` ` `` 打开 VSCode 集成终端
|
||||
5. 在终端运行命令
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm run docs:dev
|
||||
```
|
||||
|
||||
## 发现问题?
|
||||
|
||||
|
||||
@@ -1,45 +1,60 @@
|
||||
# Contribute to Project X's Document
|
||||
# Contributing to Project X Documentation
|
||||
|
||||
Contributions to Project X's Document are welcome, and we appreciate every Contributor's contribution! You guys make Xray stronger!
|
||||
Welcome to contribute to the Project X documentation. We appreciate every contributor! It is you who make Xray more powerful!
|
||||
|
||||
## Improve Document
|
||||
## Improve the Documentation
|
||||
|
||||
Document for Project X is hosted on [GitHub](https://github.com/XTLS/Xray-docs-next).
|
||||
Project X documentation is hosted on [GitHub](https://github.com/XTLS/Xray-docs-next).
|
||||
|
||||
You can submit your changes to the Document by following these steps:
|
||||
You can submit your changes to the documentation by following these steps:
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
2. Get a clone of the docs from the repository you cloned using whatever tool you like, like:
|
||||
2. For simple edits, you can complete them directly on the GitHub website.<br>
|
||||
However, for complex edits, please use VSCode. Clone the documentation from your forked repository, for example:
|
||||
|
||||
```
|
||||
git clone https://github.com/XTLS/Xray-docs-next.git
|
||||
```
|
||||
```bash
|
||||
git clone [https://github.com/your-github-username/Xray-docs-next.git](https://github.com/your-github-username/Xray-docs-next.git)
|
||||
```
|
||||
|
||||
3. Create a new branch based on the main branch, such as:
|
||||
3. Create a new branch based on the `main` branch, for example:
|
||||
|
||||
```
|
||||
git checkout -b your-branch
|
||||
```
|
||||
```bash
|
||||
git checkout -b your-branch
|
||||
```
|
||||
|
||||
4. Make changes on the new branch.
|
||||
4. Make your changes on the new branch.
|
||||
|
||||
5. After modification, please use [Prettier](https://prettier.io/docs/en/install.html)Format your changes.
|
||||
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).
|
||||
|
||||
Note: Pull requests with formatting issues may be rejected.
|
||||
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.
|
||||
|
||||
6. Submit the changes and push them to your repository
|
||||
Note: PRs with formatting issues may be rejected.
|
||||
|
||||
```
|
||||
git push -u origin your-branch
|
||||
```
|
||||
6. Commit your changes and push them to your repository:
|
||||
|
||||
6. Open GitHub, click 'Pull request' to submit a pull request to [Project X Document](https://github.com/XTLS/Xray-docs-next).
|
||||
```bash
|
||||
git push -u origin your-branch
|
||||
```
|
||||
|
||||
7. Please outline the new/modified content of this pull request in the title and body of the pull request;
|
||||
7. Open GitHub and click **'Pull request'** to submit a PR to the [Project X Documentation Repository](https://github.com/XTLS/Xray-docs-next).
|
||||
|
||||
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).
|
||||
8. Please summarize the additions/changes of this PR in the title and body.
|
||||
|
||||
## Found Problems?
|
||||
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).
|
||||
|
||||
If you find an error in the document, you can improve the documentation or submit an issue.
|
||||
10. Want to preview the full effect locally?
|
||||
1. Install [Node.JS](https://nodejs.org/en/download)
|
||||
2. Install [pnpm](https://pnpm.io/installation)
|
||||
3. Restart VSCode and open this project
|
||||
4. Press `Ctrl` + `` ` `` to open the VSCode integrated terminal
|
||||
5. Run the following commands in the terminal:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm run docs:dev
|
||||
```
|
||||
|
||||
## Found an Issue?
|
||||
|
||||
If you find errors in the documentation, you can improve the documentation or submit an Issue.
|
||||
|
||||
@@ -1,47 +1,60 @@
|
||||
# Вклад в документацию Project X
|
||||
|
||||
Мы приветствуем ваш вклад в документацию Project X и благодарим каждого контрибьютора за помощь! Вы делаете Xray лучше!
|
||||
Добро пожаловать в команду участников документации Project X. Мы ценим вклад каждого контрибьютора! Именно вы делаете Xray мощнее!
|
||||
|
||||
## Улучшение документации
|
||||
|
||||
Документация Project X размещена на [GitHub](https://github.com/XTLS/Xray-docs-next).
|
||||
|
||||
Вы можете внести изменения в документацию, выполнив следующие действия:
|
||||
Вы можете внести свои изменения в документацию, выполнив следующие шаги:
|
||||
|
||||
1. Откройте [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next), нажмите кнопку "Fork" в правом верхнем углу, чтобы создать копию репозитория документации в вашей учетной записи GitHub.
|
||||
1. Откройте [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next) и нажмите **Fork** в правом верхнем углу, чтобы создать копию репозитория (зеркало) в вашем аккаунте GitHub.
|
||||
|
||||
2. Используйте любой удобный инструмент для клонирования документации из вашего репозитория, например:
|
||||
2. Простые правки можно внести прямо на веб-сайте GitHub.<br>
|
||||
Однако для сложных изменений обязательно используйте VSCode. Склонируйте документацию из вашего форка, например:
|
||||
|
||||
```
|
||||
git clone https://github.com/XTLS/Xray-docs-next.git
|
||||
```
|
||||
```bash
|
||||
git clone [https://github.com/ваше-имя-пользователя/Xray-docs-next.git](https://github.com/ваше-имя-пользователя/Xray-docs-next.git)
|
||||
```
|
||||
|
||||
3. Создайте новую ветку на основе ветки `main`, например:
|
||||
|
||||
```
|
||||
git checkout -b your-branch
|
||||
```
|
||||
```bash
|
||||
git checkout -b your-branch
|
||||
```
|
||||
|
||||
4. Внесите изменения в новую ветку.
|
||||
4. Внесите изменения в новой ветке.
|
||||
|
||||
Примечание: рекомендуем придерживаться [Руководства по оформлению текстов на китайском языке](https://github.com/sparanoid/chinese-copywriting-guidelines) (на китайском).
|
||||
Примечание: Рекомендуется использовать автоформатирование [prettier](https://prettier.io/docs/install), а также придерживаться [информационного стиля (Главред)](https://glvrd.ru/) для ясности текста.
|
||||
|
||||
5. После внесения изменений отформатируйте их с помощью [Prettier](https://prettier.io/docs/en/install.html).
|
||||
5. После завершения редактирования плагин VSCode автоматически отформатирует ваши изменения. В этом репозитории уже предварительно настроены все необходимые плагины для VSCode; вам нужно лишь установить их одним нажатием, следуя подсказкам VSCode.
|
||||
|
||||
Примечание: запросы на включение (PR) с ошибками форматирования могут быть отклонены.
|
||||
Примечание: PR с проблемами форматирования могут быть отклонены.
|
||||
|
||||
6. Зафиксируйте изменения и отправьте их в ваш репозиторий:
|
||||
6. Зафиксируйте (commit) изменения и отправьте (push) их в свой репозиторий:
|
||||
|
||||
```
|
||||
git push -u origin your-branch
|
||||
```
|
||||
```bash
|
||||
git push -u origin your-branch
|
||||
```
|
||||
|
||||
7. Откройте GitHub, перейдите в раздел "Pull requests" и создайте новый запрос на включение (PR) в [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next).
|
||||
7. Откройте GitHub и нажмите **'Pull request'**, чтобы отправить PR в [репозиторий документации Project X](https://github.com/XTLS/Xray-docs-next).
|
||||
|
||||
8. В заголовке и описании PR кратко опишите внесенные изменения.
|
||||
8. Пожалуйста, в заголовке и тексте PR кратко опишите добавленный или измененный контент.
|
||||
|
||||
9. Дождитесь ответа. Если ваш PR будет принят, изменения появятся на [сайте документации Project X](https://xtls.github.io).
|
||||
9. Ожидайте ответа. Если PR будет принят (merge), ваши изменения появятся непосредственно на [сайте документации Project X](https://xtls.github.io).
|
||||
|
||||
10. Хотите предварительно просмотреть полный результат локально?
|
||||
1. Установите [Node.JS](https://nodejs.org/en/download)
|
||||
2. Установите [pnpm](https://pnpm.io/installation)
|
||||
3. Перезапустите VSCode и откройте этот проект
|
||||
4. Нажмите `Ctrl` + `` ` `` чтобы открыть встроенный терминал VSCode
|
||||
5. Запустите следующие команды в терминале:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm run docs:dev
|
||||
```
|
||||
|
||||
## Нашли ошибку?
|
||||
|
||||
Если вы обнаружили ошибку в документации, вы можете внести исправления или создать задачу (Issue).
|
||||
Если вы обнаружили ошибку в документации, вы можете улучшить её самостоятельно или создать Issue.
|
||||
|
||||
Reference in New Issue
Block a user