mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-25 03:35:29 +01:00
Fall back to classic theme if rtd_theme not available
This commit is contained in:
parent
c34d30566f
commit
c1b3beab11
@ -119,11 +119,16 @@ todo_include_todos = True
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
|
||||
# Use RTD theme even when compiling locally.
|
||||
# Attempt to use RTD theme even when compiling locally.
|
||||
if os.environ.get("READTHEDOCS", "") != "True":
|
||||
try:
|
||||
import sphinx_rtd_theme
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
except ImportError:
|
||||
html_theme = "classic"
|
||||
else:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user