diff --git a/doc/source/conf.py b/doc/source/conf.py index dc45aa96ca..61e8913d54 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -21,11 +21,14 @@ sys.path.insert(0, os.path.abspath('../..')) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - 'sphinx.ext.autodoc', - #'sphinx.ext.intersphinx', - 'oslosphinx' + 'sphinx.ext.autodoc' ] +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: + extensions.append('oslosphinx') + # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable