From 0c362c5ceeb90d6d5ab79dd33ecffa12af70d589 Mon Sep 17 00:00:00 2001 From: Mahmoud Hashemi Date: Thu, 24 Sep 2015 12:14:34 -0700 Subject: [PATCH] debugging RTD issue #1692 --- docs/conf.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index bc4f7a5..881ae11 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,7 @@ import os import sys import sphinx - +from pprint import pprint # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -26,6 +26,8 @@ PACKAGE_PATH = os.path.abspath(CUR_PATH + '/../boltons/') sys.path.insert(0, PROJECT_PATH) sys.path.insert(0, PACKAGE_PATH) +pprint(os.environ) + def get_mod_stats(): # TODO: docstring percentage. @@ -117,8 +119,6 @@ intersphinx_mapping = {'python': ('https://docs.python.org/2.7', None)} # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -from pprint import pprint -pprint(os.environ) # tmp on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_rtd_theme @@ -131,7 +131,14 @@ if not on_rtd: # only import and set the theme if we're building docs locally #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] + +# TEMP: see https://github.com/rtfd/readthedocs.org/issues/1692 +# Add RTD Theme Path. +if 'html_theme_path' in globals(): + html_theme_path.append('/home/docs/checkouts/readthedocs.org/readthedocs/templates/sphinx') +else: + html_theme_path = ['_themes', '/home/docs/checkouts/readthedocs.org/readthedocs/templates/sphinx'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation".