Skip to main content

Extend code-block directive for sphinx-revealjs builder

Project description

sphinx-revealjs-ext-codeblock

PyPI - Version PyPI - Python Version

Extend code-block directive for Sphinx revealjs builder.


Table of Contents

Installation

pip install sphinx-revealjs-ext-codeblock

Usage

conf.py

extensions = [
    "sphinx_revealjs",
    "sphinx_revealjs_ext_codeblock",
]

Specify revealjs_script_plugins & revealjs_css_files.

Line Numbers

.. code-block:: python
    :linenos:

    while True:
        print("Hello world!")
<pre>
  <code class="python" data-line-numbers>
while True:
    print(&quot;Hello world!&quot;)
  </code>
</pre>

See https://revealjs.com/code/#line-numbers-%26-highlights

Highlights

.. code-block:: python
    :emphasize-lines: 2

    while True:
        print("Hello world!")
<pre>
  <code class="python" data-line-numbers="2">
while True:
    print(&quot;Hello world!&quot;)
  </code>
</pre>

See https://revealjs.com/code/#line-numbers-%26-highlights

License

sphinx-revealjs-ext-codeblock is distributed under the terms of the MIT license.

Download files

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

Source Distribution

sphinx_revealjs_ext_codeblock-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file sphinx_revealjs_ext_codeblock-0.1.0.tar.gz.

File metadata

File hashes

Hashes for sphinx_revealjs_ext_codeblock-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76581133faa602829dd1b6271a6366eb8148d29e0128ade563952c0954178c8a
MD5 f591842cb8dafed44447dbf449accc65
BLAKE2b-256 df87112709ed26c2378bad11dc675e5e31e1acc2e00a17ed0b34d4aeaac0279d

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_revealjs_ext_codeblock-0.1.0.tar.gz:

Publisher: publish.yml on ftnext/sphinx-revealjs-ext-codeblock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_revealjs_ext_codeblock-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_revealjs_ext_codeblock-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fdd47b0f2766a1d59065f57630a1cf5b92abb2106c4f58ce6741f49f48c74e4a
MD5 c53243789c6049c68e7a3000d6470bd8
BLAKE2b-256 2b346e1dca7946215817409f7c0d887d7a1b7da6e150cddb33cb4d8cbff22080

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_revealjs_ext_codeblock-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ftnext/sphinx-revealjs-ext-codeblock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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