|
1 | | -# Contribute to Project X's Document |
| 1 | +# Contributing to Project X Documentation |
2 | 2 |
|
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! |
4 | 4 |
|
5 | | -## Improve Document |
| 5 | +## Improve the Documentation |
6 | 6 |
|
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). |
8 | 8 |
|
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: |
10 | 10 |
|
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. |
12 | 12 |
|
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: |
14 | 15 |
|
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 | + ``` |
18 | 19 |
|
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: |
20 | 21 |
|
21 | | -``` |
22 | | -git checkout -b your-branch |
23 | | -``` |
| 22 | + ```bash |
| 23 | + git checkout -b your-branch |
| 24 | + ``` |
24 | 25 |
|
25 | | -4. Make changes on the new branch. |
| 26 | +4. Make your changes on the new branch. |
26 | 27 |
|
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). |
28 | 29 |
|
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. |
30 | 31 |
|
31 | | -6. Submit the changes and push them to your repository |
| 32 | + Note: PRs with formatting issues may be rejected. |
32 | 33 |
|
33 | | -``` |
34 | | -git push -u origin your-branch |
35 | | -``` |
| 34 | +6. Commit your changes and push them to your repository: |
36 | 35 |
|
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 | + ``` |
38 | 39 |
|
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). |
40 | 41 |
|
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. |
42 | 43 |
|
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). |
44 | 45 |
|
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. |
0 commit comments