Skip to content

Commit 0022e44

Browse files
authored
Merge pull request #13677 from nextcloud/backport/13647/stable31
[stable31] feat: Automated EoL warning banner for unsupported releases
2 parents a881f5e + f32a25e commit 0022e44

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

conf.py

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

84+
# Automatically add EoL warning banner to docs for unsupported releases
85+
if (version.isdigit() and version < version_start):
86+
rst_prolog = """.. danger::
87+
**OUTDATED DOCUMENTATION**
88+
89+
*You are viewing documentation for a retired version of Nextcloud.
90+
Do not follow these instructions for current releases.*
91+
92+
**To ensure you have the most reliable and up-to-date guidance,
93+
please visit the** `Nextcloud Documentation homepage
94+
<https://docs.nextcloud.com/>`_.
95+
"""
96+
8497
# user starts in light mode
8598
default_dark_mode = False
8699

0 commit comments

Comments
 (0)