Docs now automatically figure out the pyCraft version. Docs now also use the RTD theme when compiling locally.

This commit is contained in:
Jeppe Klitgaard 2015-04-01 20:00:51 +02:00
parent 83a92daf0b
commit 687435cc96
1 changed files with 9 additions and 7 deletions

View File

@ -63,10 +63,11 @@ author = u'Ammar Askar'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
import minecraft
# The short X.Y version.
version = '0.01'
version = minecraft.__version__
# The full version, including alpha/beta/rc tags.
release = '0.01'
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -117,11 +118,12 @@ todo_include_todos = True
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd:
html_theme = 'default'
else:
html_theme = 'alabaster'
# Use RTD theme even when compiling locally.
if os.environ.get("READTHEDOCS", "") != "True":
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# 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