Skip to content

Commit 6ed93fc

Browse files
authored
DOC: Add sphinx-toggleprompt and sphinx-copybutton (pandas-dev#47870)
1 parent ffc111c commit 6ed93fc

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

doc/source/conf.py

+15-10
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,25 @@
5050
# sphinxext.
5151

5252
extensions = [
53-
"sphinx.ext.autodoc",
54-
"sphinx.ext.autosummary",
55-
"sphinx.ext.doctest",
56-
"sphinx.ext.extlinks",
57-
"sphinx.ext.todo",
58-
"numpydoc", # handle NumPy documentation formatted docstrings
53+
"contributors", # custom pandas extension
5954
"IPython.sphinxext.ipython_directive",
6055
"IPython.sphinxext.ipython_console_highlighting",
6156
"matplotlib.sphinxext.plot_directive",
62-
"sphinx.ext.intersphinx",
57+
"numpydoc",
58+
"sphinx_copybutton",
59+
"sphinx_panels",
60+
"sphinx_toggleprompt",
61+
"sphinx.ext.autodoc",
62+
"sphinx.ext.autosummary",
6363
"sphinx.ext.coverage",
64-
"sphinx.ext.mathjax",
64+
"sphinx.ext.doctest",
65+
"sphinx.ext.extlinks",
6566
"sphinx.ext.ifconfig",
67+
"sphinx.ext.intersphinx",
6668
"sphinx.ext.linkcode",
69+
"sphinx.ext.mathjax",
70+
"sphinx.ext.todo",
6771
"nbsphinx",
68-
"sphinx_panels",
69-
"contributors", # custom pandas extension
7072
]
7173

7274
exclude_patterns = [
@@ -144,6 +146,9 @@
144146
# already loads it
145147
panels_add_bootstrap_css = False
146148

149+
# https://sphinx-toggleprompt.readthedocs.io/en/stable/#offset
150+
toggleprompt_offset_right = 35
151+
147152
# Add any paths that contain templates here, relative to this directory.
148153
templates_path = ["../_templates"]
149154

environment.yml

+2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ dependencies:
103103
- pytest-cython # doctest
104104
- sphinx
105105
- sphinx-panels
106+
- sphinx-copybutton
106107
- types-python-dateutil
107108
- types-PyMySQL
108109
- types-pytz
@@ -128,3 +129,4 @@ dependencies:
128129
- jupyterlab >=3.4,<4
129130
- pip:
130131
- jupyterlite==0.1.0b10
132+
- sphinx-toggleprompt

requirements-dev.txt

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ pydata-sphinx-theme==0.8.0
8080
pytest-cython
8181
sphinx
8282
sphinx-panels
83+
sphinx-copybutton
8384
types-python-dateutil
8485
types-PyMySQL
8586
types-pytz
@@ -98,4 +99,5 @@ pyyaml
9899
requests
99100
jupyterlab >=3.4,<4
100101
jupyterlite==0.1.0b10
102+
sphinx-toggleprompt
101103
setuptools>=51.0.0

0 commit comments

Comments
 (0)