mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-25 11:46:54 +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
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
|
import minecraft
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.01'
|
version = minecraft.__version__
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.01'
|
release = version
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# 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
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
|
||||||
if on_rtd:
|
# Use RTD theme even when compiling locally.
|
||||||
html_theme = 'default'
|
if os.environ.get("READTHEDOCS", "") != "True":
|
||||||
else:
|
import sphinx_rtd_theme
|
||||||
html_theme = 'alabaster'
|
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
|
# 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
|
# further. For a list of options available for each theme, see the
|
||||||
|
Loading…
Reference in New Issue
Block a user