summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/conf.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 4b36f7e..560334d 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -85,9 +85,26 @@ html_theme_options = {
"show_prev_next": False,
"navbar_end": ["search-field.html", "navbar-icon-links.html"],
}
+# NOTE: The following is required for supporting of older sphinx toolchains.
+# The "theme-switcher" templated should be added directly to navbar_end
+# above and the following lines removed when the minimum supported
+# version of pydata_sphinx_theme is 0.9.0
+# Add version switcher for versions of pydata_sphinx_theme that support it
+import packaging
+import pydata_sphinx_theme
+
+if packaging.version.parse(pydata_sphinx_theme.__version__) >= packaging.version.parse(
+ "0.9.0"
+):
+ html_theme_options["navbar_end"].insert(0, "theme-switcher")
+
+
html_sidebars = {
"**": [],
}
+html_context = {
+ "default_mode": "light",
+}
html_title = f"{project} v{version} Manual"
html_last_updated_fmt = "%b %d, %Y"