We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a194b5b commit 26caf95Copy full SHA for 26caf95
doc/conf.py
@@ -83,8 +83,17 @@
83
html_theme_options = {
84
"github_url": "https://github.com/numpy/numpydoc",
85
"show_prev_next": False,
86
- "navbar_end": ["theme-switcher", "search-field.html", "navbar-icon-links.html"],
+ "navbar_end": ["search-field.html", "navbar-icon-links.html"],
87
}
88
+# Add version switcher for versions of pydata_sphinx_theme that support it
89
+import packaging
90
+import pydata_sphinx_theme
91
+
92
+if packaging.version.parse(pydata_sphinx_theme.__version__) >= packaging.version.parse(
93
+ "0.9.0"
94
+):
95
+ html_theme_options["navbar_end"].insert(0, "theme-switcher")
96
97
html_sidebars = {
98
"**": [],
99
0 commit comments