Extensions for Sphinx which allow for substitutions.
Project description
Sphinx Substitution Extensions
Extensions for Sphinx which allow substitutions.
Installation
$ pip install Sphinx-Substitution-Extensions
This supports Python 3.5+.
Setup
Add the following to conf.py:
extensions += ['sphinx_substitution_extensions']
Set the following variable in conf.py:
substitutions = [
('|release|', '0.1'),
('|author|', 'Eleanor'),
]
This will replace |release| in the new directives with 0.1, and |author| with Eleanor.
Directives
substitution-code-block
.. substitution-code-block:: bash
echo "|author| released version |release|"
This is an extension of Sphinx’s built-in code-block directive, and adds replacement functionality.
substitution-prompt
.. substitution-prompt:: bash
echo "|author| released version |release|"
This is an extension of sphinx-prompt.
substitution-prompt acts similarly to sphinx-prompt, and adds replacement functionality.
Credits
ClusterHQ Developers
This package is largely inspired by code written for Flocker by ClusterHQ. Developers of the relevant code include, at least, Jon Giddy and Tom Prince.
Contributing
See CONTRIBUTING.rst.
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 Substitution Extensions-2018.11.12.3.tar.gz
.
File metadata
- Download URL: Sphinx Substitution Extensions-2018.11.12.3.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 218db1c7b521567a6ddf240fb4d68d8b8e4c2fe0a32b60d8707a1a436c43913b |
|
MD5 | c2350cf941d002acad5d897a29e2c5c7 |
|
BLAKE2b-256 | 1c70074b11e672c9aaec743ae33ae69aa329d475b44e19235d86ef1cde2ac82a |
File details
Details for the file Sphinx_Substitution_Extensions-2018.11.12.3-py3-none-any.whl
.
File metadata
- Download URL: Sphinx_Substitution_Extensions-2018.11.12.3-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4197e34e162b9212076f380efbc0e6764a20f57f0390c27bb439bc405ab24e |
|
MD5 | dcee8d1b8d4471d19fe37045d5ae1df7 |
|
BLAKE2b-256 | 1f748372670fbe912561767615f153cd2afce158480c96c8ced6f3334d1a693e |