Skip to main content

sphinx-variations

A Sphinx extension that allows project maintainers to create multiple variations of their documentation, based on its usage of the .. only directive. Each variation contains a Sphinx tag and a friendly name.

How to Use

Installing

sphinx-variations is available on PyPi:

python3 -m pip install sphinx-variations

After installing the package, list the extension in your Sphinx project's conf.py.

extensions = [..., 'variations']

Configuration

To create multiple variations for your docs, a list of tags to use as variations can be inserted into your conf.py file:

variations = [( [tagname], [friendly name] )]

For example:

variations = [('python', 'Python'),
              ('cpp', 'C++')]

The above will cause two copies of the documentation text to be made, each in a directory with the tag name. Static files are not copied between the two variations, but are shared between them.

Template Variables

This extension also provides two template variables, variations and currentvariation.

variations contains the complete list of variations in the same format specified above, and currentvariation contains the tuple for the current variation.

These variables can be used to create links between the different variations of your documentation, for example.

License

MIT, see LICENSE.

Metadata

Release files for sphinx-variations 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-variations 1.1.1
File Size Uploaded
sphinx_variations-1.1.1.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-variations 1.1.1
File Interpreter ABI Platform
sphinx_variations-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / sphinx_variations-1.1.1.tar.gz

Download URL sphinx_variations-1.1.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
21d5929cb3bfc89555df81c65d782b88fd87b7ce02858d280b3bdf8ee5877653
BLAKE2b-256 checksum
How to use checksums
8bf3b4689cc6e133c6d3527a3e555374e7a294b44331144b8b72d12ad533f6f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / sphinx_variations-1.1.1-py3-none-any.whl

Download URL sphinx_variations-1.1.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26b9a7604d70c5adb70e5e1670d303a128cd83c239bb5bc37b79168911212abf
BLAKE2b-256 checksum
How to use checksums
fd035c39361257e49da9adcb84839c77b1ef2c37d73f1a8a9f02a0db3c1075d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.5

1 release file

1.0.4

1 release file

1.0.3

3 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page