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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx-copybutton-0.2.11.tar.gz
  • Upload date:
  • Size: 110.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for sphinx-copybutton-0.2.11.tar.gz
Algorithm Hash digest
SHA256 cf3bb6dc4b82217fe1a765d733aa478949ae8574670aa2c5e7c94de81326ad50
MD5 496605a386974e20bfb6ef6bd40a5503
BLAKE2b-256 23285b32ff11b8dda007cafe6fff399758b222c757bcf3e7bd4b92c771e4b772

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sphinx_copybutton-0.2.11-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/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for sphinx_copybutton-0.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 7eff55f0d1f8aee42f9538b5659efe326d58fea04c11c986886bbdc0a233232d
MD5 b1d7942404f07e70ec34a48ba68d1f57
BLAKE2b-256 4d5cbdb0120834d2fd42dcdaa0e946d228ba854acce00eb268ad901435b54b9d

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