-
Notifications
You must be signed in to change notification settings - Fork 942
/
conf.py
137 lines (103 loc) · 3.91 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/usr/bin/env python3
#
# -- source files and parsers -----------------------------------
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
# -- Sphinx extensions and configuration ------------------------
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting',
'recommonmark',
]
intersphinx_mapping = {
'ipython': ('http://ipython.org/ipython-doc/dev/', None),
'nbconvert': ('https://nbconvert.readthedocs.io/en/latest/', None),
'nbformat': ('https://nbformat.readthedocs.io/en/latest/', None),
'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
}
# prolog based on https://github.com/spatialaudio/nbsphinx/blob/98005a9d6b331b7d6d14221539154df69f7ae51a/doc/conf.py#L38
nbsphinx_prolog = r"""
{% set docname_link = env.doc2path(env.docname, base=None).replace(' ', '%20') %}
{% set docname_display = env.doc2path(env.docname, base=None) %}
.. raw:: html
<div class="admonition note">
This page was generated from
<a class="reference external" href="https://github.com/jupyter-widgets/ipywidgets/blob/{{ env.config.release|e }}/docs/source/{{ docname_link|e }}">{{ docname_display|e }}</a>.<br>
Interactive online version:
<span style="white-space: nowrap;"><a href="https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/{{ env.config.release|e }}?urlpath=lab/tree/docs/source/{{ docname_link|e }}"><img alt="Binder badge" src="https://mybinder.org/badge_logo.svg" style="vertical-align:text-bottom"></a>.</span>
</div>
.. raw:: latex
\nbsphinxstartnotebook{\scriptsize\noindent\strut
\textcolor{gray}{The following section was generated from
\sphinxcode{\sphinxupquote{\strut {{ docname | escape_latex }}}} \dotfill}}
"""
nbsphinx_execute = 'always'
# -- General information -------
_release = {}
exec(compile(open('../../python/ipywidgets/ipywidgets/_version.py').read(), '../../python/ipywidgets/ipywidgets/_version.py', 'exec'), _release)
from packaging.version import Version
v = Version(_release['__version__'])
version = f'{v.major}.{v.minor}'
release = _release['__version__']
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']
master_doc = 'index'
project = 'Jupyter Widgets'
copyright = '2017-2021 Project Jupyter'
author = 'Jupyter Team'
language = None
exclude_patterns = [
'**.ipynb_checkpoints',
'examples.md',
'examples/Beat Frequencies.ipynb',
'examples/Controller.ipynb',
'examples/Exploring Graphs.ipynb',
'examples/Export As (nbconvert).ipynb',
'examples/Factoring.ipynb',
'examples/Imag*',
'examples/Index.ipynb',
'examples/Lorenz Differential Equations.ipynb',
'examples/Media widgets.ipynb',
'examples/Variable Inspector.ipynb',
'examples/Widget Alignment.ipynb',
]
pygments_style = 'sphinx'
todo_include_todos = False
# -- html --------------------------
html_theme = 'sphinx_rtd_theme'
# html_static_path = ['_static']
htmlhelp_basename = 'ipywidgetsdoc'
# -- latex -------------------------
latex_elements = {}
latex_documents = [
(master_doc, 'ipywidgets.tex', 'ipywidgets Documentation',
'https://jupyter.org', 'manual'),
]
# -- tex ---------------------------
texinfo_documents = [
(master_doc, 'ipywidgets', 'ipywidgets Documentation',
author, 'ipywidgets', 'One line description of project.',
'Miscellaneous'),
]
# -- epub --------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# -- Theme options -----------------
# Options are theme-specific and customize the look and feel of the theme.
html_theme_options = {
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 2,
'includehidden': True,
'titles_only': False
}