From 906402ac47c8b6401c39dc46868904e6c073eebf Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 14 Jan 2012 22:27:16 +0100 Subject: [PATCH] Use default theme on Read The Docs --- docs/conf.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3a18950d..c05b13f7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,7 +55,9 @@ for mod_name in MOCK_MODULES: sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) sys.path.insert(0, os.path.abspath(os.path.dirname(__file__) + '/../')) -import mopidy +# When RTD builds the project, it sets the READTHEDOCS environment variable to +# the string True. +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' # -- General configuration ----------------------------------------------------- @@ -85,6 +87,7 @@ copyright = u'2010-2012, Stein Magnus Jodal and contributors' # built documents. # # The full version, including alpha/beta/rc tags. +import mopidy release = mopidy.get_version() # The short X.Y version. version = '.'.join(release.split('.')[:2]) @@ -132,7 +135,10 @@ modindex_common_prefix = ['mopidy.'] # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'nature' +if on_rtd: + html_theme = 'default' +else: + html_theme = 'nature' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the