mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-22 02:08:56 +01:00
Docs now automatically figure out the pyCraft version. Docs now also use the RTD theme when compiling locally.
This commit is contained in:
parent
83a92daf0b
commit
687435cc96
16
docs/conf.py
16
docs/conf.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user