From 8f6a8ced1638c2d5f21c43d167d979e9a4f50f38 Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Sun, 15 Jun 2025 21:20:39 -0700 Subject: [PATCH] add theme switching; dark vs light mode --- docs/conf.py | 27 ++++++++++++++------------- docs/requirements.txt | 1 + 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 09e1d712..6bb55f07 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,7 @@ release = '0.14.20250420-beta' # -- General configuration --------------------------------------------------- -extensions = ['sphinx_rtd_theme'] +extensions = ['sphinx_rtd_theme','sphinx_rtd_dark_mode'] templates_path = ['_templates'] @@ -33,20 +33,21 @@ html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] html_theme_options = { - 'logo_only': False, - 'prev_next_buttons_location': 'bottom', - 'style_external_links': False, - 'vcs_pageview_mode': '', - 'style_nav_header_background': 'white', - 'flyout_display': 'hidden', - 'version_selector': True, - 'language_selector': True, - # Toc options 'collapse_navigation': True, - 'sticky_navigation': True, - 'navigation_depth': 4, + 'flyout_display': 'hidden', 'includehidden': True, - 'titles_only': False + 'language_selector': True, + 'logo_only': False, + 'navigation_depth': 4, + 'prev_next_buttons_location': 'bottom', + 'sticky_navigation': True, + 'style_external_links': False, + 'style_nav_header_background': 'white', + 'theme_switcher': True, + 'default_mode': 'auto', + 'titles_only': False, + 'vcs_pageview_mode': '', + 'version_selector': True, } # -- Options for HTMLHelp output --------------------------------------------- diff --git a/docs/requirements.txt b/docs/requirements.txt index f0cf8765..7297fa80 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ docutils < 0.18 sphinx sphinx_rtd_theme +sphinx-rtd-dark-mode