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

Uploaded Source

Built Distribution

sphinx_copybutton-0.2.8-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx-copybutton-0.2.8.tar.gz
  • Upload date:
  • Size: 465.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191029 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for sphinx-copybutton-0.2.8.tar.gz
Algorithm Hash digest
SHA256 48aec91c44af057e4a59fba962493e09dd992b13d2555d5776e8a701420a5308
MD5 f6d5a93800c4fcfa7ca85803522ad37f
BLAKE2b-256 cd0af4433d8d81b68f41f7c3ae0141d1ee3a61485bdbd5de4ee57027bdc2e6f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sphinx_copybutton-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191029 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for sphinx_copybutton-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7e7dc147c383a84b63de41837b28660d0c8189808384ea93883e381e5864a28a
MD5 b091c8a0f6c08a7e1400428ac69dbfda
BLAKE2b-256 3cfd9cfeb17139e31644930d4701b2ecfcd403bce0f26bfeef0e5340710e237b

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