Add local RTD theme default
Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/commit/018c1ad5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/tree/018c1ad5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/diff/018c1ad5 Branch: refs/heads/4.4 Commit: 018c1ad50ccd31f25234ff1b1fec73dd3ee012e1 Parents: a55b0db Author: Sebastien Goasguen <run...@gmail.com> Authored: Mon Jun 30 12:49:17 2014 +0200 Committer: Sebastien Goasguen <run...@gmail.com> Committed: Mon Jun 30 12:49:17 2014 +0200 ---------------------------------------------------------------------- source/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/blob/018c1ad5/source/conf.py ---------------------------------------------------------------------- diff --git a/source/conf.py b/source/conf.py index 517956a..b181590 100644 --- a/source/conf.py +++ b/source/conf.py @@ -17,6 +17,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. @@ -105,6 +107,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