on master help sign in
Modified conf.py to work locally if rtd-theme is not installed.
572d70fJan de Muijnck-Hughes
docs/conf.py+6−5
@@ -115,11 +115,12 @@ todo_include_todos = True
115html_theme = "default"
115html_theme = "default"
116
116
117if not on_rtd: # only import and set the theme if we're building docs locally
117if not on_rtd: # only import and set the theme if we're building docs locally
118+ try:
118− import sphinx_rtd_theme
119+ import sphinx_rtd_theme
119− html_theme = 'sphinx_rtd_theme'
120+ html_theme = 'sphinx_rtd_theme'
120− html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
121+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
121−
122+ except ImportError:
122−
123+ html_theme = "default"
123
124
124# Theme options are theme-specific and customize the look and feel of a theme
125# Theme options are theme-specific and customize the look and feel of a theme
125# further. For a list of options available for each theme, see the
126# further. For a list of options available for each theme, see the