Files

2.4 KiB

Contributing to Project X Documentation

Welcome to contribute to the Project X documentation. We appreciate every contributor! It is you who make Xray more powerful!

Improve the Documentation

Project X documentation is hosted on GitHub.

You can submit your changes to the documentation by following these steps:

  1. Open the Project X Documentation Repository and click Fork in the top right corner to fork a copy of the repository to your own GitHub account.

  2. For simple edits, you can complete them directly on the GitHub website.
    However, for complex edits, please use VSCode. Clone the documentation from your forked repository, for example:

    git clone https://github.com/your-github-username/Xray-docs-next.git
    
  3. Create a new branch based on the main branch, for example:

    git checkout -b your-branch
    
  4. Make your changes on the new branch.

    Note: We recommend using automatic formatting with prettier and following the Google Developer Documentation Style Guide.

  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.

    Note: PRs with formatting issues may be rejected.

  6. Commit your changes and push them to your repository:

    git push -u origin your-branch
    
  7. Open GitHub and click 'Pull request' to submit a PR to the Project X Documentation Repository.

  8. Please summarize the additions/changes of this PR in the title and body.

  9. Wait for a response. If your PR is merged, your changes will appear directly on the Project X Documentation Website.

  10. Want to preview the full effect locally?

    1. Install Node.JS

    2. Install pnpm

    3. Restart VSCode and open this project

    4. Press Ctrl + ` to open the VSCode integrated terminal

    5. Run the following commands in the terminal:

      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.