diff --git a/doc/_static/versions.json b/doc/_static/versions.json
new file mode 100644
index 000000000..a1434e297
--- /dev/null
+++ b/doc/_static/versions.json
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "0.2 (devel)",
+ "version": "dev",
+ "url": "https://www.pywhy.org/pywhy-graphs/dev/index.html"
+ },
+ {
+ "name": "0.1",
+ "version": "stable",
+ "url": "https://www.pywhy.org/pywhy-graphs/stable/index.html"
+ }
+]
diff --git a/doc/_templates/docs-navbar.html b/doc/_templates/docs-navbar.html
deleted file mode 100644
index 8abc16f1e..000000000
--- a/doc/_templates/docs-navbar.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{%- extends "pydata_sphinx_theme/docs-navbar.html" %}
-
-{%- block icon_links -%}
-
-
- -
-
-
-
-
-
-{%- include "icon-links.html" with context -%}
-{%- endblock %}
diff --git a/doc/_templates/docs-toc.html b/doc/_templates/docs-toc.html
deleted file mode 100644
index 97dc4a69f..000000000
--- a/doc/_templates/docs-toc.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{% set page_toc = generate_toc_html() %}
-
-{%- if page_toc | length >= 1 %}
-
- On this page
-
-{%- endif %}
-
-
-
-{% include "edit_this_page.html" %}
diff --git a/doc/_templates/version-switcher.html b/doc/_templates/version-switcher.html
deleted file mode 100644
index 34a6da54b..000000000
--- a/doc/_templates/version-switcher.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
diff --git a/doc/conf.py b/doc/conf.py
index 9afea6489..ed3c0144d 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -36,6 +36,7 @@
copyright = f"{datetime.today().year}, Adam Li"
author = "Adam Li"
version = pywhy_graphs.__version__
+release = version
# -- General configuration ---------------------------------------------------
@@ -270,6 +271,7 @@ def setup(app):
html_css_files = ["css/custom.css"]
html_favicon = "_static/favicon_url.ico"
+switcher_version_match = "dev" if "dev" in release else version
html_theme_options = {
"icon_links": [
dict(
@@ -281,7 +283,11 @@ def setup(app):
"use_edit_page_button": False,
"navigation_with_keys": False,
"show_toc_level": 1,
- "navbar_end": ["version-switcher", "navbar-icon-links"],
+ "navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"],
+ "switcher": {
+ "json_url": "https://raw.githubusercontent.com/neurodata/treeple/main/doc/_static/versions.json", # noqa: E501
+ "version_match": switcher_version_match,
+ },
}
scrapers = ("matplotlib",)