Configuration

Every option below goes in html_theme_options. Values shown are the defaults.

Branding

Option

Default

Description

logo_text

""

Text next to the logo. Falls back to html_title.

logo_subtitle

""

Small secondary line, e.g. a version tag.

announcement

""

Gold banner pinned above the header. HTML is allowed.

footer_note

""

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_font

rs

Body copy font. See Getting started.

heading_font

rs-bold

Heading font.

mono_font

system mono

Code font. Code stays in a real monospace face by default, because pixel fonts and code indentation do not mix.

base_font_size

20px

Root font size. Bare numbers are read as pixels.

Surface treatment

Option

Default

Description

scanlines

true

The faint stone texture on panels, cards and admonitions.

pixelated_images

false

Render every image with image-rendering: pixelated. Great for sprites, unkind to screenshots,hence off by default.

css_variables

{}

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"]