Skip to content

Commit ed6eff6

Browse files
authored
Merge pull request #13647 from nextcloud/jtr/feat/eol-warning-banner
feat: Automated EoL warning banner for unsupported releases
2 parents bbc978c + 9be24d8 commit ed6eff6

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
@@ -90,6 +90,19 @@ def generateVersionsDocs(current_docs):
9090
edit_on_github_project = 'nextcloud/documentation'
9191
edit_on_github_branch = 'master'
9292

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

0 commit comments

Comments
 (0)