[Docs] Use ReadTheDocs theme if available.

Use ReadTheDocs theme for Sphinx if available since it is well
maintained and used by readthedocs.org.

Differential Revision: https://reviews.llvm.org/D33387

llvm-svn: 303550
This commit is contained in:
Siddharth Bhat 2017-05-22 13:36:15 +00:00
parent b2f754e39f
commit 68ae83e68c

View File

@ -92,7 +92,13 @@ pygments_style = 'friendly'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'haiku'
try:
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ModuleNotFoundError:
html_theme = 'haiku'
# 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