aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/conf.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 087b260..69ab8d3 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -16,10 +16,21 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
-# import os
-# import sys
+import os
+import sys
+import subprocess
# sys.path.insert(0, os.path.abspath('.'))
+# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+print subprocess.check_output('mkdir -p build/doxygen && doxygen', shell=True)
+
+breathe_projects = {
+ 'vis': 'build/doxygen/xml'
+}
+
+breathe_default_project = "vis"
# -- General configuration ------------------------------------------------
@@ -30,7 +41,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
-extensions = []
+extensions = ['breathe']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -152,5 +163,10 @@ texinfo_documents = [
'Miscellaneous'),
]
+if not on_rtd: # only import and set the theme if we're building docs locally
+ import sphinx_rtd_theme
+ html_theme = 'sphinx_rtd_theme'
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+# otherwise, readthedocs.org uses their theme by default, so no need to specify it