Configuration¶
Every option below goes in html_theme_options. Values shown are the
defaults.
Branding¶
Option |
Default |
Description |
|---|---|---|
|
|
Text next to the logo. Falls back to |
|
|
Small secondary line, e.g. a version tag. |
|
|
Gold banner pinned above the header. HTML is allowed. |
|
|
Small print on its own footer row. |
Edit this page¶
Set source_repository to add an “Edit this page” link. GitHub and GitLab
URL shapes are both recognised.
html_theme_options = {
"source_repository": "https://github.com/me/my-project",
"source_branch": "main",
"source_directory": "docs",
}
Typography¶
Option |
Default |
Description |
|---|---|---|
|
|
Body copy font. See Getting started. |
|
|
Heading font. |
|
system mono |
Code font. Code stays in a real monospace face by default, because pixel fonts and code indentation do not mix. |
|
|
Root font size. Bare numbers are read as pixels. |
Surface treatment¶
Option |
Default |
Description |
|---|---|---|
|
|
The faint stone texture on panels, cards and admonitions. |
|
|
Render every image with |
|
|
Override any design token. See below. |
Recolouring the theme¶
Every colour, size and bevel is a CSS custom property on :root. Override
them without touching the stylesheets:
html_theme_options = {
"css_variables": {
"rs-gold": "#7fd4ff",
"rs-orange": "#c8e8ff",
"rs-content-max-width": "52rem",
"rs-sidebar-width": "300px",
},
}
The leading -- is optional; both rs-gold and --rs-gold work.
See also
The full token list lives at the top of
sphinx_2009scape_theme/theme/2009scape/static/css/2009scape.css.
Custom stylesheets¶
For anything the tokens do not cover, add your own stylesheet the usual way:
html_static_path = ["_static"]
html_css_files = ["custom.css"]