Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dce61d3

Browse files
committed
Use sphinx-rtd-theme.
1 parent d1e7cf3 commit dce61d3

3 files changed

Lines changed: 13 additions & 28 deletions

File tree

docs/api_vs_bindings/index.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ APIs or bindings?
33

44
This page describes both the **APIs** and the **bindings** provided by the *python-maec* library.
55

6-
.. toctree::
7-
:hidden:
8-
9-
api_snippet
10-
binding_snippet
11-
126
Overview
137
--------
148

@@ -61,4 +55,4 @@ Feedback
6155

6256
If there is a problem with the APIs or bindings, or if there is functionality missing from the APIs that forces the use of the bindings, let us know in the `python-maec issue tracker`_
6357

64-
.. _python-maec issue tracker: https://github.com/MAECProject/python-maec/issues
58+
.. _python-maec issue tracker: https://github.com/MAECProject/python-maec/issues

docs/conf.py

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
import maec
24

35
project = u'python-maec'
@@ -23,29 +25,17 @@
2325
**Version**: {}
2426
""".format(release)
2527

26-
exclude_patterns = ['_build']
28+
exclude_patterns = ['_build', 'api_vs_bindings/*_snippet.rst']
2729
pygments_style = 'sphinx'
2830

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+
4939
html_sidebars = {"**": ['localtoc.html', 'relations.html', 'sourcelink.html',
5040
'searchbox.html', 'links.html']}
5141

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def get_version():
2929
# TODO: remove when updating to Sphinx 1.3, since napoleon will be
3030
# included as sphinx.ext.napoleon
3131
'sphinxcontrib-napoleon==0.2.4',
32+
'sphinx_rtd_theme==0.1.7',
3233
],
3334
'test': [
3435
"nose==1.3.0",

0 commit comments

Comments
 (0)