README.md 1.6 KB
Newer Older
H
He Wang 已提交
1 2 3
# Build documentation with MkDocs

OceanBase documentation is built with [MkDocs](https://www.mkdocs.org/). You can check [`mkdocs.yml`](mkdocs.yml) for more information.
4
Please install MkDocs according to [the installation documents of MkDocs](https://www.mkdocs.org/user-guide/installation/)
H
He Wang 已提交
5 6 7 8 9

## Requirements

Before installing dependencies, please make sure you have installed a recent version of Python 3 and pip.

Z
zhijiuxing-alt 已提交
10
Then you can run the following command in your terminal at current directory:
H
He Wang 已提交
11

12 13 14
```
$ pip install -r requirements.txt
```
H
He Wang 已提交
15 16 17 18
## Build the documentation

You can build the documentation by running the following command:

19 20 21
```
$ mkdocs build
```
H
He Wang 已提交
22 23 24 25 26 27 28

This will create a new directory to store the output files, which is `site/` by default.

## Start a server locally

You can start a server locally by running the following command:

29 30 31
```
$ mkdocs serve
```
H
He Wang 已提交
32 33 34 35 36 37 38 39 40 41 42 43 44 45
Open up http://127.0.0.1:8000/ in your browser, and you'll see the default home page.

## Modify pages

### Edit a page

If you want to modify the content of a page, you can edit the markdown file in `docs/` directory directly.

### Modify the layout of pages

To modify the layout of pages, you need to edit `mkdocs.yml`.

For configuration details, see [MkDocs User Guide](https://www.mkdocs.org/user-guide/configuration/).

46 47 48
Note the following rules when editing documents:
- All paths in `nav` must be relative to the `docs_dir`, which is `docs` by default. So here `./` is equivalent to [docs](docs).
- All internal links must be relative paths, as MkDocs only supports regular Markdown linking syntax.
H
He Wang 已提交
49 50 51

## Contribute

52
See [How to contribute](wiki/how_to_contribute)