Skip to content

Commit 3043cbf

Browse files
authored
add docs copybutton (#47)
1 parent f96173a commit 3043cbf

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ci/requirements/rtd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ dependencies:
77
- numpy
88
- scipy
99
- sphinx
10+
- sphinx-copybutton
1011
- sphinx_rtd_theme

docs/tephi/source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
'matplotlib.sphinxext.plot_directive',
4545
'custom_class_autodoc',
4646
'generate_package_rst',
47+
'sphinx_copybutton',
4748
]
4849

4950
# List of packages to document
@@ -269,3 +270,6 @@
269270
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
270271
'matplotlib': ('http://matplotlib.sourceforge.net/', None),
271272
}
273+
274+
# Define Python input prompt to copybutton.
275+
copybutton_prompt_text = ">>> "

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ pytest
99
pytest-cov
1010
pytest-xdist
1111
sphinx
12+
sphinx-copybutton
1213
sphinx_rtd_theme

0 commit comments

Comments
 (0)