| Serge Bazanski | aad7948 | 2021-07-02 17:40:36 +0200 | [diff] [blame] | 1 | Metropolis Handbook |
| 2 | === |
| 3 | |
| 4 | This directory contains the sources of the Metropolis Handbook end-user documentation. |
| 5 | |
| 6 | Layout |
| 7 | --- |
| 8 | |
| 9 | Everything within `//monogon/handbook/src` will be used to generate documentation with [mdbook](https://rust-lang.github.io/mdBook/format/index.html). |
| 10 | |
| 11 | Compared to upstream mdbook we do not have a static `book.toml` file, one is instead generated as part of the build process. See the definition of the `//metropolis/handbook` target to change some of the options. |
| 12 | |
| 13 | Building |
| 14 | --- |
| 15 | |
| 16 | bazel build //metropolis/handbook |
| 17 | |
| 18 | Then, you can visit the following file in your browser: |
| 19 | |
| 20 | bazel-bin/metropolis/handbook/handbook/index.html |
| 21 | |
| 22 | To view the built documentation. |
| 23 | |
| 24 | Interactive editing |
| 25 | --- |
| 26 | |
| 27 | For faster edit/check loops of the handbook, you can use `ibazel`: |
| 28 | |
| 29 | ibazel build //metropolis/handbook |
| 30 | |
| 31 | This will automatically rebuild the handbook any time some source changes. |
| 32 | |
| 33 | You will still need to manually refresh your browser to see any changes. This could be made better, if needed, by injecting some [ibazel-compatible live reload javascript](https://github.com/bazelbuild/bazel-watcher/blob/84cab6f15f64850fb972ea88701e634c8b611301/example_client/example_client.go#L24) to automatically reload the page on changes, or by adding a target which launches `mdbook serve`. |
| 34 | |
| 35 | Publishing |
| 36 | --- |
| 37 | |
| 38 | We currently do not build the handbook automatically and/or publish it anywhere. |