Use RTD theme
diff --git a/doc/README b/doc/README
index 2a525bb..2c6359c 100644
--- a/doc/README
+++ b/doc/README
@@ -1,4 +1,4 @@
This is the pyOpenSSL documentation source. It uses Sphinx. To build the
-documentation, install Sphinx 1.0 and run:
+documentation, install Sphinx and run:
$ make html
diff --git a/doc/conf.py b/doc/conf.py
index 8277202..5d34ae7 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -121,7 +121,12 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'classic'
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+if not on_rtd: # only import and set the theme if we're building docs locally
+ import sphinx_rtd_theme
+ html_theme = 'sphinx_rtd_theme'
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# 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
diff --git a/doc/index.rst b/doc/index.rst
index e4a5a23..7006ec6 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -23,4 +23,3 @@
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
-