vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit c3fca7ec90ec999d5ddac92121d72f9430a86673
parent 962dd610391e8273667ab28d13689d15d546b5e3
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 28 Apr 2017 22:16:52 +0200

doc: add sphinx breathe extension

Diffstat:
Mdoc/conf.py | 22+++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)

diff --git 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