Skip to content

Zvážit přechod na jiný theme než sphinx_rtd_theme, který je mrtvý #590

Open

Description

@honzajavorek

Pan Claude to prozkoumal za mně, když jsem se ho zeptal, jak to je po letech s tím dark modem v #463:

Nothing has changed upstream since this issue was opened, so dark mode is no more feasible through sphinx_rtd_theme than it was then. What has changed is that we now know how little of the site depends on that theme, so switching to another theme looks like a small job.

Upstream status

How much of our setup is tied to the RTD theme

  • docs/conf.py sets html_theme = "sphinx_rtd_theme" and html_logo, and passes no theme-specific options.
  • docs/_static/custom.css has two small rules, both using the RTD-specific .rst-content selector. They would need new selectors.
  • docs/_templates/page.html overrides the htmltitle and extrahead blocks of !page.html. A new theme would need to provide those same blocks; this hasn't been checked for any candidate yet.
  • redirect.js doesn't depend on the theme.
  • pygments_style = "monokai" is a dark highlighting style. A theme with dark mode lets you set separate light and dark styles, so we'd probably choose a light style for light mode.
  • The six SVG illustrations already respond to the reader's light/dark setting. Prefer black even for dark mode (for now, until we have dark mode) #464 only set their dark colour to #000, so undoing it means changing that back to #ccc in the <style> line of each file.

Recommendation: Waiting for sphinx_rtd_theme doesn't look worthwhile. Switching to a theme with built-in dark mode is the practical route. Furo is the usual choice: it follows the system setting, has a toggle, and its colours can be set from conf.py. After the switch we'd revert #464. I estimate a small PR, mostly spent on the template and CSS, plus checking that Read the Docs still builds it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions