Skip to main content

Extensions for Sphinx which allow for substitutions.

Project description

Build Status

codecov

Requirements Status

Sphinx Substitutions Extensions

Extensions for Sphinx which allow substitutions.

Installation

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-prompt

Then use the following:

.. 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

sphinx-prompt authors

Thanks to @sbrunner and other contributors for sphinx-prompt. substitution-prompt is based on sphinx-prompt.

ClusterHQ

This package is largely inspired by code written for Flocker by ClusterHQ.

Contributing

See CONTRIBUTING.rst.

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 Substitution Extensions-2018.11.12.1.tar.gz.

File metadata

  • Download URL: Sphinx Substitution Extensions-2018.11.12.1.tar.gz
  • Upload date:
  • Size: 20.0 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

Hashes for Sphinx Substitution Extensions-2018.11.12.1.tar.gz
Algorithm Hash digest
SHA256 005d27f8d79b3e1b87d95bcc0effa0296c5ebe2748412fcd83ef7031b65d745c
MD5 ad8f7cc5ba0f85edca9e816216780ffc
BLAKE2b-256 5d07ec7c52ec15910c06f4e6918210ac21ae490137c888e7acb1750cd0d17f42

See more details on using hashes here.

File details

Details for the file Sphinx_Substitution_Extensions-2018.11.12.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Sphinx_Substitution_Extensions-2018.11.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a0822ecb9f9c900bda2fd462eb87c46cf1d7bd9fa5c453adb56039323b0b912
MD5 e4afd1f840c56baec7de929cf251fdbc
BLAKE2b-256 79061ed2ef5fa64cd04d6b154fca58f7921349ce660579c1d170e73c028793b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page