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' %} + + {% endif %} diff --git a/pydata_sphinx_theme/theme.conf b/pydata_sphinx_theme/theme.conf index f045f552b..01a567d1b 100644 --- a/pydata_sphinx_theme/theme.conf +++ b/pydata_sphinx_theme/theme.conf @@ -10,6 +10,7 @@ use_edit_page_button = False external_links = github_url = twitter_url = +version_switcher = google_analytics_id = show_prev_next = True search_bar_text = Search the docs ... diff --git a/pydata_sphinx_theme/version-switcher.html b/pydata_sphinx_theme/version-switcher.html new file mode 100644 index 000000000..24ddd7acd --- /dev/null +++ b/pydata_sphinx_theme/version-switcher.html @@ -0,0 +1,66 @@ + + + + \ No newline at end of file