sphinxcontrib-jsdemo – HTML/Javascript Demo extension for Sphinx
Overview
sphinxcontrib-jsdemo is an extension for embedding HTML/Javascript demo snippets into Sphinx documents.
You can see this extension in action at http://htsql.org/htraf/index.html. For more examples, see demo directory in the source distribution.
This software is written by Kirill Simonov (Prometheus Research, LLC) and released under BSD license.
Usage
To enable this extension, add the following line to conf.py:
extensions.append('sphinxcontrib.jsdemo')
Now you can include a snippet of HTML/Javascript code to a Sphinx document using demo directive. For example:
.. demo:: <button>Click me!</button>
The directive renders its content twice: as a raw HTML block (demo) and as a literal block (source). Clicking on the Demo and Source headers toggles visibility of the blocks.
Option layout allows you to control the relative order of the blocks. For example, the following directive renders the source block before the demo block with the content of the demo block initially hidden:
.. demo:: :layout: +source, -demo <button>Click me, too!</button>
Reference
Directives
- demo
Inserts a demo widget.
The directive is rendered as a composite node with two blocks:
A demo block containing raw HTML content.
A source block with the same content in literal form.
Clicking on a block header toggles the block’s visibility.
Options:
- layout
This option controls the order of the blocks and their initial visibility. It must contain comma-separated list of blocks with optional + or - indicators specifying the initial visibility. Examples:
- demo, source
Render the demo block before the source block. This is the default value of the option.
- +source, -demo
Render the source block before the demo block. The content of the demo block is hidden.
- -demo
Render the demo block only; hidden.
Configuration parameters
- demo_layout
The layout for demo directives with no layout option. By default, +demo, +source.
CSS classes
- demo-wrapper
Wraps the demo directive.
- demo-header
Wraps a block header.
- demo-hide
If set on a block header, indicates that the content of the block is hidden.
- demo-area
Wraps the demo block.
- demo-source
Wraps the source block.
Metadata
Release files for sphinxcontrib-jsdemo 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sphinxcontrib-jsdemo-0.1.4.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinxcontrib_jsdemo-0.1.4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 14.1 kB
Release files / sphinxcontrib-jsdemo-0.1.4.tar.gz
| Download URL | sphinxcontrib-jsdemo-0.1.4.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d03b6af0dfed69413039ee8a5e6b62846353e942afb56fecf0fd3b067dc1447
|
|
BLAKE2b-256 checksum How to use checksums |
89122224b833a3b9e0bbb9e47a4ed38dbedf422af2d722a4b8d9d1cbbc17ec32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sphinxcontrib_jsdemo-0.1.4-py2-none-any.whl
| Download URL | sphinxcontrib_jsdemo-0.1.4-py2-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
b9aa9f109cd1ffe517c7ef2edb7d60a634a5d814cd18cd58cb1fb966c79548cf
|
|
BLAKE2b-256 checksum How to use checksums |
4098165419b88ba45fef65010fa0072f1e39ab4a11e1853427dcbf1add2a6f47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sphinxcontrib-jsdemo 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.