File tree 2 files changed +8
-3
lines changed
src/pydata_sphinx_theme/theme/pydata_sphinx_theme/_templates
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 78
78
html_theme = "pydata_sphinx_theme"
79
79
# html_logo = "_static/pandas.svg" # For testing
80
80
81
+ # Define the json_url for our version switcher.
82
+ json_url = "https://pydata-sphinx-theme.readthedocs.io/en/latest/_static/switcher.json"
83
+
81
84
# Define the version we use for matching in the version switcher.
82
85
version_match = os .environ .get ("READTHEDOCS_VERSION" )
83
86
# If READTHEDOCS_VERSION doesn't exist, we're not on RTD
87
90
release = pydata_sphinx_theme .__version__
88
91
if "dev" in release :
89
92
version_match = "latest"
93
+ # We want to keep the relative reference if we are in dev mode
94
+ # but we want the whole url if we are effectively in a released version
95
+ json_url = "/_static/switcher.json"
90
96
else :
91
97
version_match = "v" + release
92
98
124
130
# "left_sidebar_end": ["custom-template.html", "sidebar-ethical-ads.html"],
125
131
# "footer_items": ["copyright", "sphinx-version", ""]
126
132
"switcher" : {
127
- # "json_url": "/_static/switcher.json",
128
- "json_url" : "https://pydata-sphinx-theme.readthedocs.io/en/latest/_static/switcher.json" ,
133
+ "json_url" : json_url ,
129
134
"url_template" : "https://pydata-sphinx-theme.readthedocs.io/en/{version}/" ,
130
135
"version_match" : version_match ,
131
136
},
Original file line number Diff line number Diff line change 76
76
$ ( "#version_switcher_button" ) . text ( entry . name ) ;
77
77
// Add extra class to the button for the selected entry
78
78
if ( "extra_classes" in entry ) {
79
- $ ( "#version_switcher_menu" ) . classList . add ( ...entry . extra_classes ) ;
79
+ $ ( "#version_switcher_menu" ) [ 0 ] . classList . add ( ...entry . extra_classes ) ;
80
80
}
81
81
}
82
82
} ) ;
You can’t perform that action at this time.
0 commit comments