Skip to content

Commit ea40b03

Browse files
committed
add sphinx-copybutton
1 parent 42b22a2 commit ea40b03

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

doc/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class PyTypeObject(ctypes.Structure):
8787
'IPython.sphinxext.ipython_console_highlighting',
8888
'IPython.sphinxext.ipython_directive',
8989
'sphinx.ext.mathjax',
90+
'sphinx_copybutton',
9091
'sphinx_design',
9192
]
9293

@@ -285,6 +286,7 @@ def setup(app):
285286
plot_html_show_formats = False
286287
plot_html_show_source_link = False
287288

289+
copybutton_prompt_text = ">>> "
288290
# -----------------------------------------------------------------------------
289291
# LaTeX output
290292
# -----------------------------------------------------------------------------

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies:
2929
- mypy=1.10.0
3030
# For building docs
3131
- sphinx>=4.5.0
32+
- sphinx-copybutton
3233
- sphinx-design
3334
- numpydoc=1.4.0
3435
- ipython

requirements/doc_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
sphinx==7.2.6
33
numpydoc==1.4
44
pydata-sphinx-theme>=0.15.2
5+
sphinx-copybutton
56
sphinx-design
67
scipy
78
matplotlib

0 commit comments

Comments
 (0)