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.

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_revealjs_ext_codeblock-0.1.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_revealjs_ext_codeblock-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for sphinx_revealjs_ext_codeblock-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c8646d911454de4ecab4d256713f2da0ecd86501635fb1a004827ae0e8fb122c
MD5 9db832bf46320e117e3795806492eff2
BLAKE2b-256 879c5c02ffdb32f9f57d558c955428123a1ae0c72bbed7affc906c6430aea6cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_revealjs_ext_codeblock-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_revealjs_ext_codeblock-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f9bb4be2132d08b25aaed11fb2f65972fbcae58d29f9580f351e68120829bba
MD5 91a7b6058eac4e65abecd5c0307685a1
BLAKE2b-256 54b4708e5e47506380e978f4db4e681fcf8774f579809ae6f7fe84c7cea684e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_revealjs_ext_codeblock-0.1.1-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 Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page