Skip to content
A small sphinx extension to add a "copy" button to code blocks
JavaScript Python CSS
Branch: master
Clone or download
Latest commit b9b53dc Mar 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci updating svg path, docs, and circleci Oct 19, 2018
doc removing .btn class Nov 5, 2018
sphinx_copybutton version bump Feb 12, 2019
.gitignore fixing CDN and adding tooltips Aug 10, 2018
LICENSE Initial commit Jul 6, 2018 Fix broken link Mar 20, 2019
pyproject.toml name change Aug 31, 2018
readthedocs.yml readthedocs Oct 18, 2018 making CSS and JS more efficient and removing lots of dependencies Oct 16, 2018


PyPI | Documentation

A small sphinx extension to add a "copy" button to code blocks.

See the sphinx-copybutton documentation for more details!


You can install sphinx-copybutton with pip:

pip install sphinx-copybutton


In your configuration file, add sphinx_copybutton to your extensions list. E.g.:

extensions = [

When you build your site, your code blocks should now have little copy buttons to their right. Clicking the button will copy the code inside!


If you'd like to customize the look of the copy buttons, you can over-write any of the CSS rules specified in the Sphinx-CopyButton CSS file (link)

You can’t perform that action at this time.