diff --git a/docs/conf.py b/docs/conf.py index 6fec3bfb7..edad46a7a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,6 +67,10 @@ ], "github_url": "https://github.com/pandas-dev/pydata-sphinx-theme", "twitter_url": "https://twitter.com/pandas_dev", + "version_switcher": {"base_url": "https://pydata-sphinx-theme.readthedocs.io/", + "json": "versions.json", + "regex": r"/\/(latest|(v\d+\.\d+.\d+))\//", + "location": "navbar"}, "use_edit_page_button": True, "show_toc_level": 1, } diff --git a/pydata_sphinx_theme/docs-navbar.html b/pydata_sphinx_theme/docs-navbar.html index a87d54290..61f2d8218 100644 --- a/pydata_sphinx_theme/docs-navbar.html +++ b/pydata_sphinx_theme/docs-navbar.html @@ -47,6 +47,11 @@ {% endif %} + {% if theme_version_switcher.location == 'navbar' %} +