mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-24 19:04:02 +08:00
doc: use sphinx_rtd_theme
This commit is contained in:
parent
afd2a37e0d
commit
c4559fcd99
@ -28,6 +28,7 @@ requirements:
|
|||||||
- sphinx
|
- sphinx
|
||||||
- sphinx-argparse
|
- sphinx-argparse
|
||||||
- sphinxcontrib-wavedrom
|
- sphinxcontrib-wavedrom
|
||||||
|
- sphinx_rtd_theme
|
||||||
- h5py
|
- h5py
|
||||||
- dateutil
|
- dateutil
|
||||||
- pyqt5
|
- pyqt5
|
||||||
|
14
doc/manual/_templates/layout.html
Normal file
14
doc/manual/_templates/layout.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "!layout.html" %}
|
||||||
|
|
||||||
|
{# since sphinx_rtd_theme moves scripts to the end, hook up WaveDrom again #}
|
||||||
|
{%- block footer %}
|
||||||
|
{{ super() }}
|
||||||
|
<script>(function(){
|
||||||
|
window.addEventListener(
|
||||||
|
"load",
|
||||||
|
(function(){ try {
|
||||||
|
WaveDrom.ProcessAll();
|
||||||
|
} catch(e) {} }),
|
||||||
|
false);
|
||||||
|
})();</script>
|
||||||
|
{% endblock %}
|
@ -16,6 +16,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import sphinx_rtd_theme
|
||||||
from unittest.mock import MagicMock
|
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
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# 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
|
# 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
|
# further. For a list of options available for each theme, see the
|
||||||
# documentation.
|
# documentation.
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
'sidebarbgcolor': '#171814',
|
'analytics_id': 'UA-75602447-2',
|
||||||
'sidebarlinkcolor': '#7389ae',
|
|
||||||
'sidebartextcolor': '#b3b3bb',
|
|
||||||
'footerbgcolor': '#171814',
|
|
||||||
'footertextcolor': '#b3b3bb',
|
|
||||||
'relbarbgcolor': '#171814',
|
|
||||||
'relbarlinkcolor': '#7389ae',
|
|
||||||
'relbartextcolor': '#b3b3bb',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add any paths that contain custom themes here, relative to this directory.
|
# Add any paths that contain custom themes here, relative to this directory.
|
||||||
#html_theme_path = []
|
#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
|
# The name for this set of Sphinx documents. If None, it defaults to
|
||||||
# "<project> v<release> documentation".
|
# "<project> v<release> documentation".
|
||||||
@ -152,7 +147,7 @@ html_theme_options = {
|
|||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top
|
# The name of an image file (relative to this directory) to place at the top
|
||||||
# of the sidebar.
|
# 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
|
# 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
|
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||||
@ -293,5 +288,5 @@ texinfo_documents = [
|
|||||||
#texinfo_no_detailmenu = False
|
#texinfo_no_detailmenu = False
|
||||||
|
|
||||||
# -- Options for sphinxcontrib-wavedrom -----------------------------------
|
# -- Options for sphinxcontrib-wavedrom -----------------------------------
|
||||||
offline_skin_js_path = 'static/default.js'
|
offline_skin_js_path = '_static/default.js'
|
||||||
offline_wavedrom_js_path = 'static/WaveDrom.js'
|
offline_wavedrom_js_path = '_static/WaveDrom.js'
|
||||||
|
2
setup.py
2
setup.py
@ -12,7 +12,7 @@ if sys.version_info[:3] < (3, 5, 2):
|
|||||||
|
|
||||||
# Depends on PyQt5, but setuptools cannot check for it.
|
# Depends on PyQt5, but setuptools cannot check for it.
|
||||||
requirements = [
|
requirements = [
|
||||||
"sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom",
|
"sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom", "sphinx_rtd_theme",
|
||||||
"asyncserial", "numpy", "scipy",
|
"asyncserial", "numpy", "scipy",
|
||||||
"python-dateutil", "prettytable", "h5py",
|
"python-dateutil", "prettytable", "h5py",
|
||||||
"quamash", "pyqtgraph", "pygit2", "aiohttp",
|
"quamash", "pyqtgraph", "pygit2", "aiohttp",
|
||||||
|
Loading…
Reference in New Issue
Block a user