cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdion...@apache.org
Subject [3/5] git commit: add support to rtd_theme without is installation
Date Sun, 21 Sep 2014 14:29:22 GMT
add support to rtd_theme without is installation

Signed-off-by: sebgoa <sebgoa@sebimac.local>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-rn/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-rn/commit/41e804df
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-rn/tree/41e804df
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-rn/diff/41e804df

Branch: refs/heads/4.3
Commit: 41e804df577294c7e77473487214a7e00352a907
Parents: 75c6f9d
Author: Pierre-Luc Dion <pdion@voilevacance.ca>
Authored: Tue Apr 29 20:24:58 2014 -0400
Committer: Pierre-Luc Dion <pdion891@apache.org>
Committed: Sun Sep 21 10:10:58 2014 -0400

----------------------------------------------------------------------
 source/conf.py | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-docs-rn/blob/41e804df/source/conf.py
----------------------------------------------------------------------
diff --git a/source/conf.py b/source/conf.py
index c18daa9..6d9b561 100644
--- a/source/conf.py
+++ b/source/conf.py
@@ -31,6 +31,8 @@
 import sys
 import os
 
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
 # 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
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -119,6 +121,13 @@ pygments_style = 'sphinx'
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
 html_theme = 'default'
+if not on_rtd:
+    try:
+        import sphinx_rtd_theme
+        html_theme = 'sphinx_rtd_theme'
+        html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+    except ImportError:
+        pass
 
 # 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


Mime
View raw message