From 5c1abbef4d86bcd1ec68cf5deb90b559faf25502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Sat, 24 Aug 2019 14:13:30 +0200 Subject: Adjust docs for readthedocs. - Use proper theme in development - Use ReadTheDocs version numbers in titles --- docs/conf.py | 12 +++++++++--- 1 file 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 # " v 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 -- cgit v1.2.1