| 1 |
# Page-level configuration |
| 2 |
|
| 3 |
In some areas we support page-level configuration to control behavior on a per-page basis. |
| 4 |
Try to make this configuration follow the `html_theme_options` structure of our configuration as much as possibl. |
| 5 |
Begin them with `html_theme`, and separate "nested" configuration sections with periods (`.`). |
| 6 |
This is [similar to how the TOML language defines nested configuration](https://toml.io/en/v1.0.0#keys). |
| 7 |
|
| 8 |
For example, to remove the secondary sidebar, we use a page metadata key like this: |
| 9 |
|
| 10 |
`````{tab-set} |
| 11 |
````{tab-item} rST |
| 12 |
```rst |
| 13 |
:html_theme.sidebar_secondary.remove: true |
| 14 |
``` |
| 15 |
```` |
| 16 |
````{tab-item} Markdown |
| 17 |
```md |
| 18 |
--- |
| 19 |
html_theme.sidebar_secondary.remove: true |
| 20 |
--- |
| 21 |
``` |
| 22 |
```` |
| 23 |
````` |
| 24 |
|
| 25 |
Note how the period naturally separates nested sections, and looks very similar to what we'd expect if we put this in a Python dictionary in `conf.py`: |
| 26 |
|
| 27 |
```python |
| 28 |
html_theme_options = { |
| 29 |
"sidebar_secondary": {"remove": "true"} |
| 30 |
} |
| 31 |
``` |