|
| 1 | +import os |
| 2 | + |
1 | 3 | import maec |
2 | 4 |
|
3 | 5 | project = u'python-maec' |
|
23 | 25 | **Version**: {} |
24 | 26 | """.format(release) |
25 | 27 |
|
26 | | -exclude_patterns = ['_build'] |
| 28 | +exclude_patterns = ['_build', 'api_vs_bindings/*_snippet.rst'] |
27 | 29 | pygments_style = 'sphinx' |
28 | 30 |
|
29 | | -html_theme = 'default' |
30 | | -html_style = '/default.css' |
31 | | -html_static_path = ['_static'] |
32 | | -htmlhelp_basename = 'python-maecdoc' |
33 | | - |
34 | | -html_theme_options = { |
35 | | - 'codebgcolor': '#EEE', |
36 | | - 'footerbgcolor': '#FFF', |
37 | | - 'footertextcolor': '#114684', |
38 | | - 'headbgcolor': '#E0DBD2', |
39 | | - 'headtextcolor': '#F15A22', |
40 | | - 'headlinkcolor': '#114684', |
41 | | - 'linkcolor': '#706C60', |
42 | | - 'relbarbgcolor': '#114684', |
43 | | - 'relbartextcolor': '#F15A22', |
44 | | - 'sidebarbgcolor': '#FFF', |
45 | | - 'sidebarlinkcolor': '#706C60', |
46 | | - 'sidebartextcolor': '#000', |
47 | | - 'visitedlinkcolor': '#706C60', |
48 | | -} |
| 31 | +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 32 | +if not on_rtd: # only import and set the theme if we're building docs locally |
| 33 | + import sphinx_rtd_theme |
| 34 | + html_theme = 'sphinx_rtd_theme' |
| 35 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 36 | +else: |
| 37 | + html_theme = 'default' |
| 38 | + |
49 | 39 | html_sidebars = {"**": ['localtoc.html', 'relations.html', 'sourcelink.html', |
50 | 40 | 'searchbox.html', 'links.html']} |
51 | 41 |
|
|
0 commit comments