summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-24 14:13:30 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-26 21:34:44 +0200
commit5c1abbef4d86bcd1ec68cf5deb90b559faf25502 (patch)
treeeab9443a86b323b2d1879a15d6ae0d5cc4801291
parentc415ee4cd87915191b1ca8df2d3fbf7e49d4bbbf (diff)
downloadsemantic-version-5c1abbef4d86bcd1ec68cf5deb90b559faf25502.tar.gz
Adjust docs for readthedocs.
- Use proper theme in development - Use ReadTheDocs version numbers in titles
-rw-r--r--docs/conf.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/conf.py b/docs/conf.py
index beaf596..c5ea591 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -25,7 +25,9 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = [
+ 'sphinx.ext.viewcode',
+]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -41,7 +43,7 @@ master_doc = 'index'
# General information about the project.
project = u'python-semanticversion'
-copyright = u'2012-2014, The python-semanticversion project'
+copyright = u'2012-2019, The python-semanticversion project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -100,7 +102,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -113,6 +115,10 @@ html_theme = 'default'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
+if 'READTHEDOCS_VERSION' in os.environ:
+ # Use the readthedocs version string in preference to our known version.
+ html_title = u"{} {} documentation".format(
+ project, os.environ['READTHEDOCS_VERSION'])
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None