Skip to content

How to Contribute?

To suggest modifications to the documentation, you will need to create a pull request to the develop branch in this repository.

Open a Pull Request

There are multiple ways to initiate a pull request.

Option 1: You can directly open a pull request in Github. To find the content you want to edit, click on the Edit this page button located at the bottom of every page. Once you click on it, you will be taken to the corresponding Markdown file where you can make your changes.

Option 2: You can push your changes from the local repository if you prefer to test the final view before submitting your changes.

To make your contributions more visually appealing, we recommend using the Vitepress Markdown extensions.

Review Process

After you've opened a pull request, it will be reviewed by multiple members of the community before it can be merged into the main branch.

Note the following:

  1. Each pull request requires at least two approvals.
  2. The Vercel bot attempts to build the documentation based on the proposed changes. If the build fails, the pull request cannot be merged.

Once the review process is complete and the pull request is merged, the changes will be automatically applied.

Build Locally

To build documentation locally, follow these steps:

  1. Clone the repository:

    bash
    git clone https://github.com/sora-xor/sora-docs.git
  2. Install the dependencies:

    bash
    npm ci
  3. Run a command that will start a local dev server:

    bash
    npm run docs:dev

Once you've started the development server, you can view the documentation site in your browser by navigating to http://localhost:5173.

Troubleshooting

If you encounter an error like "Cannot find module '@rollup/rollup-<platform>'":

  • Clean install:
    • Remove existing modules and lockfile:
      bash
      rm -rf node_modules package-lock.json
      npm install
    • If it still fails, force Rollup to use the JS implementation:
      bash
      ROLLUP_USE_NODE_JS_IMPLEMENTATION=1 npm install
      ROLLUP_USE_NODE_JS_IMPLEMENTATION=1 npm run docs:dev

On CI/Vercel, set the environment variable ROLLUP_USE_NODE_JS_IMPLEMENTATION=1 and use the build command:

bash
npm run build

The static output will be in .vitepress/dist.

sora.org