Garret Kelly | 0247ff8 | 2019-11-13 12:43:24 -0500 | [diff] [blame] | 1 | # Documentation Site |
| 2 | This directory contains the configuration required to build and deploy the |
| 3 | [documentation site](https://docs.opentitan.org) as well as the continuous |
| 4 | deployment configuration that pushes a rebuilt copy of the documentation after |
| 5 | every commit. |
| 6 | |
| 7 | # Documentation Builder |
| 8 | In order to speed up the deployment there is a GCR image |
| 9 | (`gcr.io/active-premise-257318/builder`) that contains all of the project's |
| 10 | python requirements pre-installed. This cuts the deployment from several |
| 11 | minutes to around twenty seconds. To rebuild and deploy the image use the |
| 12 | `deploy-builder.sh` script. |
Tobias Wölfel | d9f63e1 | 2020-06-04 13:20:13 +0200 | [diff] [blame] | 13 | |
| 14 | # Update Hugo version |
| 15 | |
| 16 | The Hugo version is defined by variable `HUGO_EXTENDED_VERSION` in `util/build_docs.py`. |
| 17 | To ensure syntax highlighting is working correctly the CSS stylesheet must be updated following a version update. |
| 18 | |
| 19 | ## Update CSS stylesheet |
| 20 | |
| 21 | Setting the option `noClasses = false` for `[markup.highlight]` in `site/docs/config.toml` requires a stylesheet to be available. |
| 22 | This option is used in order to have two styles for light and dark mode of the documentation site. |
| 23 | The stylesheet is stored in `site/docs/assets/scss/_chroma.scss`. |
| 24 | Update the style if the Hugo version is changed: |
| 25 | |
| 26 | - Replace the content of `[data-user-color-scheme='light']` with the output of `hugo gen chromastyles --style=colorful`, but keep the first line containing the setting of the background. |
| 27 | |
| 28 | - Replace the content of `[data-user-color-scheme='dark']` with the output of `hugo gen chromastyles --style=dracula`, but keep the first line containing the setting of the background. |