A lightweight example directive to make it easy to demonstrate code / results.
Project description
sphinx-examples
A small Sphinx extension to create examples of source markup and the result of rendering it in your documentation. This is useful if you wish to demonstrate the functionality of a new directive or role in Sphinx.
🚨This is very alpha software🚨: It is packaged primarily for convience and not heavily tested. Use at your own risk!
Installation
You can install sphinx-examples
with pip
:
pip install sphinx-examples
Usage
See the sphinx-examples
documentation for more information.
Develop
To develop this extension, follow these steps:
-
Clone the repository locally
$ git clone https://github.com/executablebooks/sphinx-examples $ cd sphinx-examples
-
Install pre-commit hooks
$ pre-commit install
-
Install development and documentation dependencies
$ pip install -e .[sphinx]
The codebase for this package is in src/sphinx_examples
.
Documentation is in docs/
.
This package has no testing infrastructure, so be careful when using it! If it becomes more complex or with more features, we may add more testing around it in the future. For not it is packaged for convenience and re-use across EBP repositories.
Build the documentation
The documentation is currently not hosted anywhere, so if you'd like to preview the documentation "live", run the following command:
pip install -e .[sphinx]
sphinx-build docs docs/_build/html
Then browse the HTML files in docs/_build/html
to see the rendered documentation.
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
Built Distribution
File details
Details for the file sphinx-examples-0.0.3.tar.gz
.
File metadata
- Download URL: sphinx-examples-0.0.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2288a1a1ca53fbf342d6b1f9a43ee4505a124ef130033b8d07e253e0ea9fa20 |
|
MD5 | 983cc2362e06915b8f98197760d28257 |
|
BLAKE2b-256 | cd2d8410f2f05f6dc4734be3dbf0190d6e8b13a2e3cc169eb154b5cc3da5f131 |
Provenance
File details
Details for the file sphinx_examples-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: sphinx_examples-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.27.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3727721876f0a7c0081eae545b8ddebcbed85270c37a48e333561ed2e559fa07 |
|
MD5 | cb2ddcb548b4d9e7472553480274bf7a |
|
BLAKE2b-256 | 0d40376c743701ca3a57ad5aa8d0afd25b4e5b68b8a9d4ab04a4a3e1d02843bd |