Metadata-Version: 2.4
Name: sphinx-revealjs-ext-codeblock
Version: 0.1.1
Summary: Extend code-block directive for sphinx-revealjs builder
Project-URL: Documentation, https://github.com/ftnext/sphinx-revealjs-ext-codeblock#readme
Project-URL: Issues, https://github.com/ftnext/sphinx-revealjs-ext-codeblock/issues
Project-URL: Source, https://github.com/ftnext/sphinx-revealjs-ext-codeblock
Author-email: ftnext <takuyafjp+develop@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Sphinx
Classifier: Framework :: Sphinx :: Extension
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Documentation
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Python: >=3.10
Requires-Dist: sphinx-revealjs
Requires-Dist: sphinxcontrib-extdevhelper-kasane
Description-Content-Type: text/markdown

# sphinx-revealjs-ext-codeblock

[![PyPI - Version](https://img.shields.io/pypi/v/sphinx-revealjs-ext-codeblock.svg)](https://pypi.org/project/sphinx-revealjs-ext-codeblock)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-revealjs-ext-codeblock.svg)](https://pypi.org/project/sphinx-revealjs-ext-codeblock)

Extend `code-block` directive for Sphinx `revealjs` builder.

-----

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

```console
pip install sphinx-revealjs-ext-codeblock
```

## Usage

conf.py

```python
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

```rst
.. code-block:: python
    :linenos:

    while True:
        print("Hello world!")
```

```html
<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

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

    while True:
        print("Hello world!")
```

```html
<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](https://spdx.org/licenses/MIT.html) license.
