mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
docs: redirect to docs.scylladb.com/manual/
Define a custom alert to redirect users to the latest version of the docs in https://docs.scylladb.com/manual/ Closes scylladb/scylladb#22636
This commit is contained in:
committed by
Botond Dénes
parent
bd9f51a29c
commit
6e61fc323b
23
docs/_templates/version-warning.html
vendored
Normal file
23
docs/_templates/version-warning.html
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{% if flag != "manual" %}
|
||||
<div class="admonition caution">
|
||||
<p class="admonition-title">Caution</p>
|
||||
<p>
|
||||
You're viewing documentation for a previous version.
|
||||
<a href="https://docs.scylladb.com/manual/">Switch to the latest stable version.</a>
|
||||
</p>
|
||||
</div>
|
||||
{% elif versions and current_version and latest_version and current_version != latest_version %}
|
||||
<div class="admonition caution">
|
||||
<p class="admonition-title">Caution</p>
|
||||
<p>
|
||||
{% 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 %}
|
||||
<a href="{{ vpathto(latest_version.name) }}">Switch to the latest stable version.</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user