diff --git a/admin_manual/conf.py b/admin_manual/conf.py index 1a469042aa5..f6ead43e532 100644 --- a/admin_manual/conf.py +++ b/admin_manual/conf.py @@ -53,7 +53,8 @@ #release = '12' # General information about the project. -project = u'Nextcloud %s Administration Manual' % (version) +#project = u'Nextcloud %s Administration Manual' % (version) + #copyright = u'2012-2017, The Nextcloud developers' @@ -109,10 +110,10 @@ # } # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = "%s Administration Manual" % (project) # A shorter title for the navigation bar. Default is the same as html_title. -html_short_title = "Server Admin Manual" +#html_short_title = "Server Admin Manual" # The name of an image file (relative to this directory) to place at the top # of the sidebar. diff --git a/conf.py b/conf.py index 591c21bf0c0..f78f45c15b7 100644 --- a/conf.py +++ b/conf.py @@ -1,6 +1,7 @@ # global configuration for every documentation added at the end import os, sys, datetime +from subprocess import Popen, PIPE import sphinx_rtd_theme @@ -8,6 +9,21 @@ sys.path.insert(0, os.path.abspath(dir_path + '/_ext')) now = datetime.datetime.now() +def get_version(): + + pipe = Popen('git branch | grep \*', stdout=PIPE, shell=True, universal_newlines=True) + version = pipe.stdout.read() + + null, version = version.split("*",1) + version = version.strip() + + if version == "master": + return "upcoming" + elif version[:6] == "stable": + return version[-2:] + else: + return "%s" % (version) + extensions = ['sphinx_rtd_theme', 'sphinx_rtd_dark_mode'] # General information about the project. @@ -18,10 +34,13 @@ # built documents. # # The short X.Y version. -version = 'latest' +version = get_version() # The full version, including alpha/beta/rc tags. release = version +# General information about the project. +project = u'Nextcloud Server (%s)' % (version) + # RTD theme options html_theme_options = { 'logo_only': True, @@ -33,7 +52,7 @@ html_logo = "../_shared_assets/static/logo-white.png" # substitutions go here -rst_epilog = '.. |version| replace:: %s' % version +#rst_epilog = '.. |version| replace:: %s' % version # building the versions list version_start = 26 # THIS IS THE SUPPORTED VERSION NUMBER diff --git a/developer_manual/conf.py b/developer_manual/conf.py index a0fa8cfb09e..bcc58bb1e27 100644 --- a/developer_manual/conf.py +++ b/developer_manual/conf.py @@ -44,7 +44,7 @@ master_doc = 'index' # General information about the project. -project = u'Nextcloud %s Developer Manual' % (version) +#project = u'Nextcloud %s Developer Manual' % (version) #copyright = u'2012-2017, The Nextcloud developers' # The version info for the project you're documenting, acts as replacement for @@ -109,7 +109,7 @@ # } # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = "%s Developer Manual" % (project) # A shorter title for the navigation bar. Default is the same as html_title. html_short_title = "Developer Manual" diff --git a/user_manual/conf.py b/user_manual/conf.py index 5d0b341fa6b..3f6003ebaa3 100644 --- a/user_manual/conf.py +++ b/user_manual/conf.py @@ -53,7 +53,7 @@ #release = '12' # General information about the project. -project = u'Nextcloud %s User Manual' % (version) +#project = u'Nextcloud %s User Manual' % (version) #copyright = u'2012-2017, The Nextcloud developers' # The language for content autogenerated by Sphinx. Refer to documentation @@ -109,7 +109,7 @@ # } # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = "%s User Manual" % (project) # A shorter title for the navigation bar. Default is the same as html_title. html_short_title = "User Manual" diff --git a/user_manual/index.rst b/user_manual/index.rst index 53b60925396..18d1addaa64 100644 --- a/user_manual/index.rst +++ b/user_manual/index.rst @@ -1,8 +1,8 @@ .. _index: -============================================ -Nextcloud |version| user manual introduction -============================================ +============ +Introduction +============ **Welcome to Nextcloud: A safe home for all your data.** diff --git a/user_manual/whats_new.rst b/user_manual/whats_new.rst index 43ed61bda3c..18f85b9004d 100644 --- a/user_manual/whats_new.rst +++ b/user_manual/whats_new.rst @@ -1,6 +1,6 @@ -=========================================== -What's new for users in Nextcloud |version| -=========================================== +========== +What's new +========== 1. Easier way to select a new app: