You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pd...@apache.org on 2014/09/21 16:29:22 UTC
[3/5] git commit: add support to rtd_theme without is installation
add support to rtd_theme without is installation
Signed-off-by: sebgoa <se...@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 <pd...@voilevacance.ca>
Authored: Tue Apr 29 20:24:58 2014 -0400
Committer: Pierre-Luc Dion <pd...@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