Skip to content

Commit f4c1ac4

Browse files
committed
Add copy button
1 parent c3b6c46 commit f4c1ac4

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ sphinx==4.0.3
22
sphinx-autobuild==0.7.1
33
sphinx-inline-tabs==2021.4.11b9
44
python-docs-theme==2021.5
5+
sphinx-copybutton==0.4.0
56
git+https://github.com/pypa/pypa-docs-theme.git#egg=pypa-docs-theme

source/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@
3535
'sphinx.ext.intersphinx',
3636
'sphinx.ext.todo',
3737
'sphinx_inline_tabs',
38+
'sphinx_copybutton',
3839
]
3940

41+
# config for copy button
42+
copybutton_prompt_text = r">>> |\.\.\. "
43+
copybutton_prompt_is_regexp = True
44+
4045
# Add any paths that contain templates here, relative to this directory.
4146
templates_path = ['_templates']
4247

0 commit comments

Comments
 (0)