diff --git a/docs/course_authors/Makefile b/docs/course_authors/Makefile index a256724fbb..a9054b9932 100644 --- a/docs/course_authors/Makefile +++ b/docs/course_authors/Makefile @@ -15,7 +15,7 @@ endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -c . $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -c source $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source diff --git a/docs/course_authors/conf.py b/docs/course_authors/source/conf.py similarity index 74% rename from docs/course_authors/conf.py rename to docs/course_authors/source/conf.py index 9471ae33ab..78396b767c 100644 --- a/docs/course_authors/conf.py +++ b/docs/course_authors/source/conf.py @@ -3,6 +3,11 @@ import sys, os +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if on_rtd: # Add to syspath so RTD will find the common conf file + sys.path.append('../../../') + from docs.shared.conf import * diff --git a/docs/data/Makefile b/docs/data/Makefile index db63ce4ec1..fd08639327 100644 --- a/docs/data/Makefile +++ b/docs/data/Makefile @@ -10,7 +10,7 @@ BUILDDIR = build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -c . $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -c source $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source diff --git a/docs/data/conf.py b/docs/data/source/conf.py similarity index 76% rename from docs/data/conf.py rename to docs/data/source/conf.py index 3c335fe226..6fc7f62a25 100644 --- a/docs/data/conf.py +++ b/docs/data/source/conf.py @@ -3,6 +3,11 @@ import sys, os +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if on_rtd: # Add to syspath so RTD will find the common conf file + sys.path.append('../../../') + from docs.shared.conf import * diff --git a/docs/developers/Makefile b/docs/developers/Makefile index b59548cde2..168add14d6 100644 --- a/docs/developers/Makefile +++ b/docs/developers/Makefile @@ -10,7 +10,7 @@ BUILDDIR = build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -c . $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -c source $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source diff --git a/docs/developers/conf.py b/docs/developers/source/conf.py similarity index 97% rename from docs/developers/conf.py rename to docs/developers/source/conf.py index 8613ca9319..aaad49ba6c 100644 --- a/docs/developers/conf.py +++ b/docs/developers/source/conf.py @@ -6,6 +6,11 @@ import sys, os +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if on_rtd: # Add to syspath so RTD will find the common conf file + sys.path.append('../../../') + from docs.shared.conf import *