make readthedocs available

pull/6/head
WuHaobo 2020-04-10 03:26:41 +08:00
parent abe7ee2236
commit b8fa27a4ce
1 changed files with 5 additions and 3 deletions

View File

@ -63,9 +63,11 @@ language = 'zh'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,