| # Building documentation |
| |
| The documentation for OpenTitan is available [online](https://opentitan.org). |
| The creation of documentation is mainly based around the conversion from Markdown to HTML files with [mdbook](https://rust-lang.github.io/mdBook/). |
| Rules for how to write correct Markdown files can be found in the [reference manual](https://opentitan.org/book/doc/contributing/style_guides/markdown_usage_style.md). |
| |
| ## Building locally |
| |
| There are a few project specific [preprocessors](https://rust-lang.github.io/mdBook/format/configuration/preprocessors.html). |
| These preprocessors require the installation of the dependencies outlined in the [previous section](README.md#step-2-install-package-manager-dependencies). |
| `util/site/build-docs.sh` handles building all books in the repository and other auto-generated content, such as the API documentation generated by [Doxygen](https://www.doxygen.nl/). |
| |
| ### Running the server |
| |
| In order to run a local instance of the documentation server run the following command from the root of the project repository. |
| |
| ```sh |
| ./util/site/build-docs.sh serve |
| ``` |
| |
| This will execute the preprocessing, build the documentation and finally start a local server. |
| The output will indicate at which address the local instance can be accessed. |
| The default is [http://0.0.0.0:9000](http://0.0.0.0:9000). |