From 776fb464d3c23a66a86810e47d106c56c2cbb2ff Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Fri, 18 Oct 2024 21:47:33 -0600 Subject: [PATCH] Add versions to sidebar --- docs/_templates/versions.html | 28 ++++++++++++++++++++++++++++ docs/conf.py | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 docs/_templates/versions.html diff --git a/docs/_templates/versions.html b/docs/_templates/versions.html new file mode 100644 index 000000000..625a9a384 --- /dev/null +++ b/docs/_templates/versions.html @@ -0,0 +1,28 @@ +{%- if current_version %} +
+ + Other Versions + v: {{ current_version.name }} + + +
+ {%- if versions.tags %} +
+
Tags
+ {%- for item in versions.tags %} +
{{ item.name }}
+ {%- endfor %} +
+ {%- endif %} + {%- if versions.branches %} +
+
Branches
+ {%- for item in versions.branches %} +
{{ item.name }}
+ {%- endfor %} +
+ {%- endif %} +
+
+{%- endif %} + diff --git a/docs/conf.py b/docs/conf.py index 228f05752..b046f4cdc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,6 +42,9 @@ 'sphinx.ext.viewcode', 'sphinx.ext.napoleon'] +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + autosummary_generate = True # Otherwise, the Return parameter list looks different from the Parameters list