From 4c9cad2552ebeb96f747467017ef3155595a9d1c Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Wed, 11 May 2022 04:08:42 +0400 Subject: Add Sphinx-MultiVersion Adds the sphinx-multiversion package to be used for generating docs for all versions of the project, not just the latest. This includes all the necessary configuration to make it work cleanly. Signed-off-by: Hassan Abouelela --- docs/pages/index_redirect.html | 19 +++++++++++++++++++ docs/pages/versions.html | 23 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 docs/pages/index_redirect.html create mode 100644 docs/pages/versions.html (limited to 'docs/pages') diff --git a/docs/pages/index_redirect.html b/docs/pages/index_redirect.html new file mode 100644 index 00000000..3745c62c --- /dev/null +++ b/docs/pages/index_redirect.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} +{% set pagename = master_doc %} + +{# Redirect users to the actual docs page #} +{% block site_meta %} + {# Make sure this is loaded as early as possible #} + + {{ super() }} +{% endblock %} + +{# Show some text in-case the redirection fails #} +{% block body %} + {{ super() }} +
+

+ Please click here if you were not redirected to the latest build. +

+
+{% endblock %} diff --git a/docs/pages/versions.html b/docs/pages/versions.html new file mode 100644 index 00000000..f4564dbf --- /dev/null +++ b/docs/pages/versions.html @@ -0,0 +1,23 @@ +{% extends "page.html" %} +{% set title = "Versions" %} + +{% block content -%} + {% if versions %} +

Versions

+
+
Documentation is available for the following versions:
+
    + {# List all avaialble versions #} + {% for version in versions | reverse %} +
  • + {{ version.name }} + {{ "(current)" if version == current_version }} + {{ "- latest" if version == latest_version }} +
  • + {% endfor %} +
+
+ {% else %} +

No version information available!

+ {% endif %} +{%- endblock %} -- cgit v1.2.3