---
url: /en/guide_cloud/community/contributing-docs.md
---
# Contributing to SwanLab Official Documentation

Contributing to the project is not limited to code contributions; maintaining documentation, answering questions in issues and groups, submitting bugs, and more are all ways to contribute to the swanlab project!

We host the [official documentation](https://docs.swanlab.cn) for SwanLab in our [GitHub repository](https://github.com/SwanHubX/SwanLab-Docs), based on [vitepress](https://vitepress.dev/zh/guide/getting-started).

### How to Contribute to the Documentation

It's simple! Just clone the project, add or modify Markdown files, submit them, and create a PR.

### Environment Setup

1. Clone this repository

```bash
git clone https://github.com/SwanHubX/SwanLab-Docs
```

2. Install the dependency environment

You need to install nodejs and npm in advance. For detailed methods, please refer to the [node official tutorial](https://nodejs.org/en/download/package-manager).

Use the following command to install other dependent projects:

```bash
npm add -D vitepress
```

### Running Documentation Locally

If you are developing locally or previewing the documentation, you can run the following command in the project root directory:

```bash
npm run docs:dev
```

If you want to perform a complete compilation and packaging, use the following commands:

```bash
npm run docs:build
npm run docs:preview
```
