diff --git a/conda/artiq/meta.yaml b/conda/artiq/meta.yaml
index c936cc246..ca300b8d3 100644
--- a/conda/artiq/meta.yaml
+++ b/conda/artiq/meta.yaml
@@ -28,6 +28,7 @@ requirements:
- sphinx
- sphinx-argparse
- sphinxcontrib-wavedrom
+ - sphinx_rtd_theme
- h5py
- dateutil
- pyqt5
diff --git a/doc/manual/static/WaveDrom.js b/doc/manual/_static/WaveDrom.js
similarity index 100%
rename from doc/manual/static/WaveDrom.js
rename to doc/manual/_static/WaveDrom.js
diff --git a/doc/manual/static/default.js b/doc/manual/_static/default.js
similarity index 100%
rename from doc/manual/static/default.js
rename to doc/manual/_static/default.js
diff --git a/doc/manual/_templates/layout.html b/doc/manual/_templates/layout.html
new file mode 100644
index 000000000..1de6c4244
--- /dev/null
+++ b/doc/manual/_templates/layout.html
@@ -0,0 +1,14 @@
+{% extends "!layout.html" %}
+
+{# since sphinx_rtd_theme moves scripts to the end, hook up WaveDrom again #}
+{%- block footer %}
+{{ super() }}
+
+{% endblock %}
diff --git a/doc/manual/conf.py b/doc/manual/conf.py
index f936744dd..5719971e4 100644
--- a/doc/manual/conf.py
+++ b/doc/manual/conf.py
@@ -16,6 +16,7 @@
import sys
import os
+import sphinx_rtd_theme
from unittest.mock import MagicMock
@@ -124,24 +125,18 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'classic'
+html_theme = 'sphinx_rtd_theme'
# 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
# documentation.
html_theme_options = {
- 'sidebarbgcolor': '#171814',
- 'sidebarlinkcolor': '#7389ae',
- 'sidebartextcolor': '#b3b3bb',
- 'footerbgcolor': '#171814',
- 'footertextcolor': '#b3b3bb',
- 'relbarbgcolor': '#171814',
- 'relbarlinkcolor': '#7389ae',
- 'relbartextcolor': '#b3b3bb',
+ 'analytics_id': 'UA-75602447-2',
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
@@ -152,7 +147,7 @@ html_theme_options = {
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-html_logo = "../logo/artiq_white.png"
+html_logo = '../logo/artiq_white.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -293,5 +288,5 @@ texinfo_documents = [
#texinfo_no_detailmenu = False
# -- Options for sphinxcontrib-wavedrom -----------------------------------
-offline_skin_js_path = 'static/default.js'
-offline_wavedrom_js_path = 'static/WaveDrom.js'
+offline_skin_js_path = '_static/default.js'
+offline_wavedrom_js_path = '_static/WaveDrom.js'
diff --git a/setup.py b/setup.py
index cef634160..c3c50e8c1 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ if sys.version_info[:3] < (3, 5, 2):
# Depends on PyQt5, but setuptools cannot check for it.
requirements = [
- "sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom",
+ "sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom", "sphinx_rtd_theme",
"asyncserial", "numpy", "scipy",
"python-dateutil", "prettytable", "h5py",
"quamash", "pyqtgraph", "pygit2", "aiohttp",