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

Uploaded Source

Built Distribution

sphinx_copybutton-0.2.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx-copybutton-0.2.6.tar.gz
  • Upload date:
  • Size: 2.0 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.6.tar.gz
Algorithm Hash digest
SHA256 55ba77abc0ffbf6802e6090d4d8eb6f582f4a5349bc42bbd447f24f9fc95c95b
MD5 0c3380264ff0b7543bdff0f0f154c87f
BLAKE2b-256 c1ede2a9c74af0a62ee91f70806ba71ebd3c02dd017f62463570182f3a5b567c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sphinx_copybutton-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 035e59d05f378db94b5dcc0bae6b8f8d6c13521f31e29f007a95b731a9ffa3ce
MD5 8dc1a4d834a279d2c2c16bd81688dac3
BLAKE2b-256 52469b2d4a488f127a70888f53b62823f971741c240d823536001d0f5eab2fc6

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