Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,27 @@ docs

MindSpore tutorials and API documentation can be generated by the [Sphinx](https://www.sphinx-doc.org/en/master/) tool. Before building API documentation for MindSpore, MindSpore Hub, MindArmour or MindQuantum, the corresponding module must be completed installation. The following takes the MindSpore Python API document as an example to introduce the specific steps. The installation of MindSpore must be completed before the operation.

1. Use `pip` to install MindSpore module, which API documentation needs to built base on the installation, refe to [install](https://www.mindspore.cn/install).
1. Use `pip` to install MindSpore module, which API documentation needs to be built based on the installation. Refer to the installation guide for details.
(https://www.mindspore.cn/install).

```bash
pip install mindspore-*.*.*-cp39-cp39m-linux_x86_64.whl
```

2. Download code of the MindSpore Docs repository.
3. Download code of the MindSpore Docs repository.

```bash
git clone https://gitee.com/mindspore/docs.git
```

3. Go to the directory where the API is located, `docs/mindspore`, and install the dependency items in the requirements.txt file.
4. Go to the directory where the API is located, `docs/mindspore`, and install the dependency items in the requirements.txt file.

```bash
cd docs/mindspore
pip install -r requirements.txt
```

4. Open the configuration file `Makefile` under the directory `docs/mindspore` where the API is located, and configure it according to the language in the generated documentation. `SOURCEDIR` refers to the source folder and `BUILDDIR` refers to the name of the folder where the documentation will be built.
5. Open the configuration file `Makefile` under the directory `docs/mindspore` where the API is located, and configure it according to the language in the generated documentation. `SOURCEDIR` refers to the source folder and `BUILDDIR` refers to the name of the folder where the documentation will be built.

```text
SOURCEDIR = source_zh_cn
Expand All @@ -110,7 +111,7 @@ MindSpore tutorials and API documentation can be generated by the [Sphinx](https
- To build Chinese documentation, configure `SOURCEDIR` to `source_zh_cn` and `BUILDDIR` to `build_zh_cn`.
- To build the English documentation, configure `SOURCEDIR` as `source_en` and `BUILDDIR` as `build_en`.

5. After the file `Makefile` is configured, execute the following command under the directory `docs/mindspore` where the API is located to build the documentation:
6. After the file `Makefile` is configured, execute the following command under the directory `docs/mindspore` where the API is located to build the documentation:

```bash
make html
Expand Down