Extend code-block directive for sphinx-revealjs builder
Project description
sphinx-revealjs-ext-codeblock
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
.
- https://sphinx-revealjs.readthedocs.io/en/stable/configurations/#confval-revealjs_script_plugins
- https://sphinx-revealjs.readthedocs.io/en/stable/configurations/#confval-revealjs_css_files
Line Numbers
.. code-block:: python
:linenos:
while True:
print("Hello world!")
<pre>
<code class="python" data-line-numbers>
while True:
print("Hello world!")
</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("Hello world!")
</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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sphinx_revealjs_ext_codeblock-0.1.0.tar.gz
.
File metadata
- Download URL: sphinx_revealjs_ext_codeblock-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76581133faa602829dd1b6271a6366eb8148d29e0128ade563952c0954178c8a |
|
MD5 | f591842cb8dafed44447dbf449accc65 |
|
BLAKE2b-256 | df87112709ed26c2378bad11dc675e5e31e1acc2e00a17ed0b34d4aeaac0279d |
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
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
sphinx_revealjs_ext_codeblock-0.1.0.tar.gz
- Subject digest:
76581133faa602829dd1b6271a6366eb8148d29e0128ade563952c0954178c8a
- Sigstore transparency entry: 167808277
- Sigstore integration time:
- Permalink:
ftnext/sphinx-revealjs-ext-codeblock@a4cf84d5a819e4d5d1390c569be0cf83bda53820
- Branch / Tag:
refs/tags/0.1.0
- Owner: https://github.com/ftnext
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@a4cf84d5a819e4d5d1390c569be0cf83bda53820
- Trigger Event:
release
- Statement type:
File details
Details for the file sphinx_revealjs_ext_codeblock-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: sphinx_revealjs_ext_codeblock-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdd47b0f2766a1d59065f57630a1cf5b92abb2106c4f58ce6741f49f48c74e4a |
|
MD5 | c53243789c6049c68e7a3000d6470bd8 |
|
BLAKE2b-256 | 2b346e1dca7946215817409f7c0d887d7a1b7da6e150cddb33cb4d8cbff22080 |
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
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
sphinx_revealjs_ext_codeblock-0.1.0-py3-none-any.whl
- Subject digest:
fdd47b0f2766a1d59065f57630a1cf5b92abb2106c4f58ce6741f49f48c74e4a
- Sigstore transparency entry: 167808278
- Sigstore integration time:
- Permalink:
ftnext/sphinx-revealjs-ext-codeblock@a4cf84d5a819e4d5d1390c569be0cf83bda53820
- Branch / Tag:
refs/tags/0.1.0
- Owner: https://github.com/ftnext
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@a4cf84d5a819e4d5d1390c569be0cf83bda53820
- Trigger Event:
release
- Statement type: