If sphinx_rtd_theme_chm_friendly directory is missing, use normal theme

This commit is contained in:
baldurk
2018-08-06 17:00:48 +01:00
parent 8e2a2b13c1
commit fbec9c13aa
+5 -2
View File
@@ -320,8 +320,11 @@ texinfo_documents = [
#texinfo_no_detailmenu = False
# custom theme based on sphinx_rtd_theme
html_theme = "sphinx_rtd_theme_chm_friendly"
html_theme_path = ["."]
if os.path.isdir('sphinx_rtd_theme_chm_friendly'):
html_theme = "sphinx_rtd_theme_chm_friendly"
html_theme_path = ["."]
else:
html_theme = "sphinx_rtd_theme"
html_context = {
'show_source': False,