$npx skillfedfor your agent

sphinx-substitution-extensions

Extensions for Sphinx which allow for substitutions.

Worth itPyPI SphinxReleased Aug 2026253.8K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sphinx_substitution_extensions-2026.8.13.1-py3-none-any.whl
v2026.8.13.1 · released 2026-08-13 · Python >=3.11 · 4 runtime deps: beartype, docutils, myst-parser, sphinx

Yes. Active maintenance, low install friction, no known vulnerabilities, and permissive MIT license. Install if you maintain Sphinx documentation with repeated variable values in code examples or file paths. Skip if your documentation is static and does not benefit from templating.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later and Sphinx 8.2.0 or later.
  • Low friction install with a wheel distribution.
  • Active maintenance as of 2026-08-14 with recent release.

License · maintenance · safety

MIT (permissive) — MIT license permits use in open-source and commercial projects with minimal restrictions; attribution required.

last release 2026-08-13 (1 days) · last repo commit 2026-08-14 · 41 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 253,757 downloads/mo, #8,509 on PyPI

Verify before relying

pip install sphinx-substitution-extensions

# In conf.py:
extensions = ["sphinx_substitution_extensions"]
rst_prolog = """
.. |version| replace:: 1.0
.. |author| replace:: Jane
"""

# In your .rst file:
.. code-block:: shell
   :substitutions:

   echo "|author| released |version|"
  • Whether substitution syntax conflicts with existing Sphinx extensions in real projects
  • Performance impact when substitutions_default_enabled is true on large documentation sets
  • Exact scope of MyST Markdown support beyond the documented examples
Same gist for agents: .md · .json

What it is and what it does

This package extends Sphinx with directives that perform variable substitution in documentation content. It works by registering new options (`:substitutions:`, `:content-substitutions:`, `:path-substitutions:`) on Sphinx's built-in directives like `code-block`, `literalinclude`, `include`, and `image`, plus adds new directives like `:substitution-code:` and `:substitution-download:`. Substitutions are defined in `conf.py` via `rst_prolog` for reStructuredText or `myst_substitutions` for MyST Markdown.

The package supports both reStructuredText and MyST Markdown syntax. Variables can be scoped globally (in `rst_prolog` or `myst_substitutions`) or per-document (in frontmatter for Markdown). By default, substitution flags must be added explicitly to each directive; a `substitutions_default_enabled` setting applies them automatically across all compatible directives. It depends on sphinx, docutils, myst-parser, and beartype, and requires Python 3.11 or later.

Use it for

  • Document version numbers and release dates that appear in code examples and download links without manual updates
  • Replace author names, product names, or environment-specific values across code blocks and file paths in multi-author or multi-environment docs
  • Generate dynamic file paths in `literalinclude` and `include` directives based on substitution variables
  • Maintain consistent branding or configuration values in inline code snippets and hyperlink targets

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Active maintenance, low install friction, no known vulnerabilities, and permissive MIT license. Install if you maintain Sphinx documentation with repeated variable values in code examples or file paths. Skip if your documentation is static and does not benefit from templating.

Install

sphinx-substitution-extensions on PyPI

Before you install

Low friction install with a wheel distribution. Active maintenance as of 2026-08-14 with recent release. Depends on sphinx, docutils, myst-parser, and beartype—all standard documentation tooling.

Requires Python 3.11 or later and Sphinx 8.2.0 or later.

License in practice

MIT license permits use in open-source and commercial projects with minimal restrictions; attribution required.

Quickstart

pip install sphinx-substitution-extensions

# In conf.py:
extensions = ["sphinx_substitution_extensions"]
rst_prolog = """
.. |version| replace:: 1.0
.. |author| replace:: Jane
"""

# In your .rst file:
.. code-block:: shell
   :substitutions:

   echo "|author| released |version|"

Verify before relying

  • Whether substitution syntax conflicts with existing Sphinx extensions in real projects
  • Performance impact when substitutions_default_enabled is true on large documentation sets
  • Exact scope of MyST Markdown support beyond the documented examples

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
beartypedocutilsmyst-parsersphinx
MaintenanceActively maintained 1 days since the last release
Last repo commit
First released
Downloads253,757 / month, #8,509 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: PytestOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: sphinx_substitution_extensions-2026.8.13.1-py3-none-any.whl

Tags

Capabilities
sphinx variable substitutionsphinx code block substitutionssphinx template variablessphinx dynamic content replacementsphinx rst substitutionssphinx markdown substitutionssphinx literal include substitutions
Topics
sphinx-extensiondocumentation-tooling
PyPI keywords
documentationrstsphinx

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “sphinx variable substitution”

Give your agent the search over MCP, or paste the wish link into any chat.

More Sphinx packages

docstring-parser Worth it
PyPI · Python Modules · released Apr 2026

Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.

Install it if you need to programmatically read and extract structured data from Python docstrings.

MITpure Python · 3.8+
274.9Mdownloads / mo
Sphinx Worth it
PyPI · Software Development · released Dec 2025

Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.

BSD-2-Clausepure Python · 3.12+
91.8Mdownloads / mo
sphinxcontrib-serializinghtml With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that outputs documentation in serialized HTML formats (JSON and pickle) alongside standard HTML.

BSD-3-Clausepure Python · 3.9+dormant
30.5Mdownloads / mo
alabaster Worth it
PyPI · Documentation · released Jul 2024

Alabaster is a clean, responsive Sphinx theme for documentation that requires Python 3.10 or newer and Sphinx 6.2 or newer.

BSD-3-Clausepure Python · 3.10+dormant
30.4Mdownloads / mo
sphinxcontrib-htmlhelp With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that generates HTML help files from reStructuredText documentation source.

BSD-3-Clausepure Python · 3.9+dormant
27.7Mdownloads / mo
sphinxcontrib-qthelp With conditions
PyPI · Utilities · released Jul 2024

A Sphinx extension that converts documentation source files into QtHelp format, enabling integration with Qt-based help systems and documentation viewers.

However, be aware that maintenance is dormant—if you rely on it long-term, monitor Sphinx compatibility and consider whether QtHelp remains the right format for your…

BSD-3-Clausepure Python · 3.9+dormant
27.6Mdownloads / mo

See also sphinx-jinja · sphinxcontrib-jquery · sphinxemoji · sphinx_mdinclude · sphinx-issues · sphinx-needs · sphinx-math-dollar · sphinxcontrib-images · sphinx-thebe · sphinx-markdown-builder