@@ -479,7 +479,19 @@ def js_tag_with_cache_busting(js):
479
479
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
480
480
"collapse_navigation" : not is_release_build ,
481
481
"show_prev_next" : False ,
482
- "switcher" : {
482
+ "navbar_end" : ["theme-switcher" , "version-switcher" , "mpl_icon_links" ],
483
+ "navbar_persistent" : ["search-button" ],
484
+ "footer_start" : ["copyright" , "sphinx-version" , "doc_version" ],
485
+ # We override the announcement template from pydata-sphinx-theme, where
486
+ # this special value indicates the use of the unreleased banner. If we need
487
+ # an actual announcement, then just place the text here as usual.
488
+ "announcement" : "unreleased" if not is_release_build else "" ,
489
+ }
490
+ if not CIRCLECI :
491
+ # CircleCI hosted docs cannot load
492
+ # https://matplotlib.org/devdocs/_static/switcher.json,
493
+ # so only enable the version switcher if not on CircleCI
494
+ html_theme_options ["switcher" ] = {
483
495
# Add a unique query to the switcher.json url. This will be ignored by
484
496
# the server, but will be used as part of the key for caching by browsers
485
497
# so when we do a new meso release the switcher will update "promptly" on
@@ -490,15 +502,7 @@ def js_tag_with_cache_busting(js):
490
502
# We either go to 'stable' or to 'devdocs'
491
503
'stable' if matplotlib .__version_info__ .releaselevel == 'final'
492
504
else 'devdocs' )
493
- },
494
- "navbar_end" : ["theme-switcher" , "version-switcher" , "mpl_icon_links" ],
495
- "navbar_persistent" : ["search-button" ],
496
- "footer_start" : ["copyright" , "sphinx-version" , "doc_version" ],
497
- # We override the announcement template from pydata-sphinx-theme, where
498
- # this special value indicates the use of the unreleased banner. If we need
499
- # an actual announcement, then just place the text here as usual.
500
- "announcement" : "unreleased" if not is_release_build else "" ,
501
- }
505
+ }
502
506
include_analytics = is_release_build
503
507
if include_analytics :
504
508
html_theme_options ["analytics" ] = {
0 commit comments