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.12.tar.gz (111.5 kB view details)

Uploaded Source

Built Distribution

sphinx_copybutton-0.2.12-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx-copybutton-0.2.12.tar.gz
  • Upload date:
  • Size: 111.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for sphinx-copybutton-0.2.12.tar.gz
Algorithm Hash digest
SHA256 9492883786984b6179c92c07ab0410237b26efa826adfa792acfd17b91a63e5c
MD5 774a4e560cbf487234aead174b625565
BLAKE2b-256 b774da355d8a909a7934b5f1711fce6f056e0c398094918dec3a23703662a0fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sphinx_copybutton-0.2.12-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for sphinx_copybutton-0.2.12-py3-none-any.whl
Algorithm Hash digest
SHA256 517870030a931f313695705edbe14a8c30660829716100d3d24b379cf9257060
MD5 35d5e08e52b991a9a767a4d357bc0bc4
BLAKE2b-256 8db7aee2c0dc1c5e413fffd08d5f933f3de08d12d978583fe940c419d9eebc31

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