File tree 1 file changed +8
-16
lines changed
readthedocs/doc_builder/templates/doc_builder
1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -39,22 +39,15 @@ if os.path.exists('_static'):
39
39
html_static_path.append('{{ static_path }}')
40
40
41
41
# Add RTD Theme only if they aren't overriding it already
42
- using_rtd_theme = False
43
- if 'html_theme' in globals():
44
- if html_theme in ['default']:
42
+ using_rtd_theme = (
43
+ (
44
+ 'html_theme' in globals() and
45
+ html_theme in ['default'] and
45
46
# Allow people to bail with a hack of having an html_style
46
- if not 'html_style' in globals():
47
- import sphinx_rtd_theme
48
- html_theme = 'sphinx_rtd_theme'
49
- html_style = None
50
- html_theme_options = {}
51
- if 'html_theme_path' in globals():
52
- html_theme_path.append(sphinx_rtd_theme.get_html_theme_path())
53
- else:
54
- html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
55
-
56
- using_rtd_theme = True
57
- else:
47
+ not 'html_style' in globals()
48
+ ) or 'html_theme' in globals()
49
+ )
50
+ if using_rtd_theme:
58
51
import sphinx_rtd_theme
59
52
html_theme = 'sphinx_rtd_theme'
60
53
html_style = None
63
56
html_theme_path.append(sphinx_rtd_theme.get_html_theme_path())
64
57
else:
65
58
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
66
- using_rtd_theme = True
67
59
68
60
if globals().get('websupport2_base_url', False):
69
61
websupport2_base_url = '{{ api_host }}/websupport'
You can’t perform that action at this time.
0 commit comments