diff --git a/docs/source/_static/switcher.json b/docs/source/_static/switcher.json new file mode 100644 index 00000000000..1820e8091d6 --- /dev/null +++ b/docs/source/_static/switcher.json @@ -0,0 +1,32 @@ +[ + { + "name": "latest", + "version": "latest", + "url": "https://jupyter-notebook.readthedocs.io/en/latest/" + }, + { + "name": "stable", + "version": "stable", + "url": "https://jupyter-notebook.readthedocs.io/en/stable/" + }, + { + "name": "7.6.1", + "version": "v7.6.1", + "url": "https://jupyter-notebook.readthedocs.io/en/v7.6.1/" + }, + { + "name": "7.5.7", + "version": "v7.5.7", + "url": "https://jupyter-notebook.readthedocs.io/en/v7.5.7/" + }, + { + "name": "7.4.7", + "version": "v7.4.7", + "url": "https://jupyter-notebook.readthedocs.io/en/v7.4.7/" + }, + { + "name": "6.5.4", + "version": "v6.5.4", + "url": "https://jupyter-notebook.readthedocs.io/en/v6.5.4/" + } +] diff --git a/docs/source/conf.py b/docs/source/conf.py index 80c94d1c50d..7aad56a121c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -203,7 +203,12 @@ "image_dark": "_static/logo-rectangle-dark.svg", }, "use_edit_page_button": True, + "navbar_start": ["navbar-logo", "version-switcher"], "navigation_with_keys": False, + "switcher": { + "json_url": "https://jupyter-notebook.readthedocs.io/en/latest/_static/switcher.json", + "version_match": os.environ.get("READTHEDOCS_VERSION", "latest"), + }, } # Output for github to be used in links