From 1bddb254523a30fbcadf1883f2161f8e2c5fa9a9 Mon Sep 17 00:00:00 2001 From: andrewkern Date: Thu, 30 Jan 2025 14:40:32 -0800 Subject: [PATCH] adding version in custom footer --- docs/_static/custom.css | 6 ++++++ docs/_templates/footer.html | 5 +++++ docs/conf.py | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 docs/_static/custom.css create mode 100644 docs/_templates/footer.html diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 000000000..552a027e6 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,6 @@ +.footer { + margin-top: 20px; + text-align: center; + font-size: 0.9em; + color: #737373; +} diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html new file mode 100644 index 000000000..095d42b28 --- /dev/null +++ b/docs/_templates/footer.html @@ -0,0 +1,5 @@ +{% extends "!footer.html" %} +{% block extrafooter %} + {{ super() }} + +{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 9bfb27d11..2bae646c8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -46,6 +46,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + "sphinx_rtd_theme", "sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.intersphinx", @@ -98,6 +99,14 @@ # further. For a list of options available for each theme, see the # documentation. # +html_context = { + "display_github": True, + "version": version, + "release": release, +} +html_theme_options = { + "version_selector": True, +} # Show the version number in the navigation bar html_show_sphinx = True @@ -108,6 +117,11 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] +# Add custom CSS to style the footer +html_css_files = [ + "custom.css", +] + # Custom sidebar templates, must be a dictionary that maps document names # to template names. #