diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-04-28 22:16:52 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-04-28 23:12:20 +0200 |
| commit | 7c5eef1097425cfbcccb4745e7915fa3e547cd6b (patch) | |
| tree | ac1eb75f2b1d7e7f15b99e0ad573cc5635df4f58 /doc/conf.py | |
| parent | 9d7192480bac7b521602e8ffce6ff3655935347c (diff) | |
| download | vis-7c5eef1097425cfbcccb4745e7915fa3e547cd6b.tar.gz vis-7c5eef1097425cfbcccb4745e7915fa3e547cd6b.tar.xz | |
doc: add sphinx breathe extension
Diffstat (limited to 'doc/conf.py')
| -rw-r--r-- | doc/conf.py | 22 |
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 |
