diff --git a/docs/_templates/version-warning.html b/docs/_templates/version-warning.html new file mode 100644 index 0000000000..c24cdacffa --- /dev/null +++ b/docs/_templates/version-warning.html @@ -0,0 +1,23 @@ +{% if flag != "manual" %} +
+

Caution

+

+ You're viewing documentation for a previous version. + Switch to the latest stable version. +

+
+{% elif versions and current_version and latest_version and current_version != latest_version %} +
+

Caution

+

+ {% if current_version.name in theme_versions_unstable %} + You're viewing documentation for an unstable version of {{ project }}. + {% elif current_version.name in theme_versions_deprecated %} + You're viewing documentation for a deprecated version of {{ project }}. + {% else %} + You're viewing documentation for a previous version of {{ project }}. + {% endif %} + Switch to the latest stable version. +

+
+{% endif %} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index dd7d541e5d..73d2e8c1c2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -196,7 +196,7 @@ htmlhelp_basename = "ScyllaDocumentationdoc" html_baseurl = BASE_URL # Dictionary of values to pass into the template engine’s context for all pages -html_context = {"html_baseurl": html_baseurl} +html_context = {"html_baseurl": html_baseurl, "flag": FLAG} def setup(app): if 'opensource' in app.tags: