Skip to main content

Add a copy button to each of your code cells.

Project description

sphinx-copybutton

PyPI | Documentation

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

See the sphinx-copybutton documentation for more details!

Installation

You can install sphinx-copybutton with pip:

pip install sphinx-copybutton

Usage

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

extensions = [
    ...
    'sphinx_copybutton'
    ...
]

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!

Customization

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-copybutton-0.2.10.tar.gz (110.6 kB view details)

Uploaded Source

Built Distribution

sphinx_copybutton-0.2.10-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file sphinx-copybutton-0.2.10.tar.gz.

File metadata

  • Download URL: sphinx-copybutton-0.2.10.tar.gz
  • Upload date:
  • Size: 110.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.1.post20191125 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0

File hashes

Hashes for sphinx-copybutton-0.2.10.tar.gz
Algorithm Hash digest
SHA256 78d8ab9aded92275d2de8986e78c3857b9bdf5c5e0feac96a792a772f73bdf5d
MD5 95f1f2f47747b564cffb906bec9aa892
BLAKE2b-256 3328d2cc6baa86bfaf4900f052595223d36923563b00ac9ed39a1c6eb1597db2

See more details on using hashes here.

File details

Details for the file sphinx_copybutton-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: sphinx_copybutton-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.1.post20191125 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0

File hashes

Hashes for sphinx_copybutton-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 049c803e780b00dad6810d5a1cf48eeea225976aaafb6dbdd30e1484614e379a
MD5 8b80a9cc33315714fa8747388fbaae30
BLAKE2b-256 b308b25b232de9662e2d2181c76ed79da9b1ccdb458734ba46b0e0593dbb03e2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page