File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222author = "Simon Blanke"
2323
2424CURRENT_VERSION = f"v{ gradient_free_optimizers .__version__ } "
25+ _switcher_version = gradient_free_optimizers .__version__
2526
2627if ON_READTHEDOCS :
2728 READTHEDOCS_VERSION = os .environ .get ("READTHEDOCS_VERSION" )
2829 if READTHEDOCS_VERSION == "latest" :
2930 CURRENT_VERSION = "main"
31+ _switcher_version = "dev"
3032
3133# -- General configuration ---------------------------------------------------
3234
@@ -147,7 +149,11 @@ def find_source():
147149 "use_edit_page_button" : False ,
148150 "navbar_start" : ["navbar-logo" ],
149151 "navbar_center" : ["navbar-nav" ],
150- "navbar_end" : ["theme-switcher" , "navbar-icon-links" ],
152+ "navbar_end" : ["version-switcher" , "theme-switcher" , "navbar-icon-links" ],
153+ "switcher" : {
154+ "json_url" : "https://gradient-free-optimizers.readthedocs.io/en/latest/_static/switcher.json" ,
155+ "version_match" : _switcher_version ,
156+ },
151157 "show_nav_level" : 1 ,
152158 "show_toc_level" : 3 ,
153159 "secondary_sidebar_items" : ["page-toc" , "sourcelink" ],
You can’t perform that action at this time.
0 commit comments