File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 24
24
25
25
import pydata_sphinx_theme
26
26
27
- release = pydata_sphinx_theme .__version__
28
- version = release .replace ("dev0" , "" )
29
27
30
28
# -- General configuration ---------------------------------------------------
31
29
80
78
html_theme = "pydata_sphinx_theme"
81
79
# html_logo = "_static/pandas.svg" # For testing
82
80
83
- if "dev" in release :
84
- version_match = "dev"
81
+ # Define the version we use for matching in the version switcher.
82
+ if os .environ .get ("READTHEDOCS_VERSION" ):
83
+ # If we detect a READTHEDOCS version, just use this.
84
+ version_match = os .environ .get ("READTHEDOCS_VERSION" )
85
85
else :
86
- version_match = "v" + release
86
+ # For local development, infer the version to match from the package.
87
+ release = pydata_sphinx_theme .__version__
88
+ if "dev" in release :
89
+ version_match = "latest"
90
+ else :
91
+ version_match = "v" + release
87
92
88
93
html_theme_options = {
89
94
"external_links" : [
You can’t perform that action at this time.
0 commit comments