"test/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "c72a047f3f686224fdf3b8bb12e6d1e0529f86fd"
README.md 1.64 KB
Newer Older
1
2
# Generating the documentation

3
4
5
6
7
8
9
10
11
12
13
14
15
To generate the documentation, you first have to build it. Several packages are necessary to build the doc,
you can install them using:

```bash
pip install -r requirements.txt
```
 
## Packages installed

Here's an overview of all the packages installed. If you ran the previous command installing all packages from 
`requirements.txt`, you do not need to run the following commands.

Building it requires the package `sphinx` that you can 
16
17
18
19
20
21
22
23
24
25
26
27
28
install using:

```bash
pip install -U sphinx
```

You would also need the custom installed [theme](https://github.com/readthedocs/sphinx_rtd_theme) by 
[Read The Docs](https://readthedocs.org/). You can install it using the following command:

```bash
pip install sphinx_rtd_theme
```

29
30
31
32
33
34
35
36
The third necessary package is the `recommonmark` package to accept Markdown as well as Restructured text:

```bash
pip install recommonmark
```

## Building the documentation

37
38
39
40
41
42
Once you have setup `sphinx`, you can build the documentation by running the following command in the `/docs` folder:

```bash
make html
```

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
**NOTE**

If you are adding/removing elements from the toc-tree or from any strutural item, it is recommended to clean the build
directory before rebuilding. Run the following command to clean and build:

```bash
make clean && make html
```

---

It should build the static app that will be available under `/docs/_build/html`

## Adding a new element to the tree (toc-tree)

Acceptes files are reStructuredText (.rst) and Markdown (.md). Create a file with its extension and put it
in the source directory. You can then link it to the toc-tree by putting the filename without the extension.