Cleanup structure and duplicate outdated docs

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv)
2018-11-26 22:23:53 +01:00
parent 60879ae2ea
commit 617fd0c398
139 changed files with 161 additions and 13232 deletions

36
conf.py
View File

@@ -2,6 +2,8 @@
import os, sys, datetime
import sphinx_rtd_theme
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.abspath(dir_path + '/_ext'))
now = datetime.datetime.now()
@@ -16,16 +18,42 @@ copyright = str(now.year) + ' Nextcloud GmbH'
# built documents.
#
# The short X.Y version.
version = '14'
version = 'latest'
# The full version, including alpha/beta/rc tags.
release = '14'
release = version
# RTD theme options
html_theme_options = {
'logo_only': True,
'style_external_links': True,
'display_version': False,
}
# relative path to subdirectories
html_logo = "../_shared_assets/static/logo-white.png"
# substitutions go here
rst_epilog = '.. |version| replace:: %s' % version
# building the versions list
def generateVersionsDocs(current_docs):
version_start = 12
version_stable = 16 # INCREASE THIS NUMBER TO THE LATEST STABLE INT
versions_doc = []
for v in range(version_start, version_stable):
url = 'https://docs.nextcloud.com/server/%s/%s' % (str(v), current_docs)
versions_doc.append(tuple((v, url)))
versions_doc.append(tuple((version, 'https://docs.nextcloud.com/server/%s/%s' % (version, current_docs))))
return versions_doc
html_context = {
'doc_versions': ['11', '12', '13', '14'],
'current_doc': os.path.basename(os.getcwd()),
'current_version': version,
'READTHEDOCS': True,
'downloads': [
('User Manual', 'https://docs.nextcloud.com/server/%s/Nextcloud_User_Manual.pdf' % version),
('Administration Manual', 'https://docs.nextcloud.com/server/%s/Nextcloud_Server_Administration_Manual.pdf' % version)
],
'extra_css_files': ['_static/custom.css']
}
edit_on_github_project = 'nextcloud/documentation'