Skip to content

Commit 0a53da6

Browse files
feat: Implement EoL warning banner for unsupported releases
Added a warning banner for outdated documentation. Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent 26f435c commit 0a53da6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ def generateVersionsDocs(current_docs):
8787
edit_on_github_project = 'nextcloud/documentation'
8888
edit_on_github_branch = 'master'
8989

90+
# Automatically add EoL warning banner to docs for unsupported releases
91+
if (version.isdigit() and version < version_start):
92+
rst_prolog = """.. danger::
93+
**OUTDATED DOCUMENTATION**
94+
95+
*You are viewing documentation for a retired version of Nextcloud software.
96+
Do not follow these instructions for current releases.*
97+
98+
**To ensure you have the most reliable and up-to-date guidance,
99+
please visit the** `official Nextcloud Documentation library
100+
<https://docs.nextcloud.com/>`_.
101+
"""
102+
90103
# user starts in light mode
91104
default_dark_mode = False
92105

0 commit comments

Comments
 (0)