A Sphinx extension/tool to manage multi-version and multi-language documentation builds without relying on ReadTheDocs.
Project description
Easy Versioning (Sphinx documentation build tool)
This tool was created to address the need to add versioning to a Sphinx project without relying on Read the Docs (RTD).
This Python script automates the full workflow of preparing, versioning, building, and organizing documentation from Markdown files using the Sphinx tool.
Itโs designed for teams and organizations who want to self-host their documentation sites and prefer full control over the hosting environment and theme customization.
Easy Versioning works as an alternative approach for managing versioned and multilingual docs, complementing existing Sphinx workflows in a simple way with only one tool.
By organizing your source files in the expected structure, this tool actively builds your documentation with Sphinx and outputs a fully ready-to-deploy static site.
With minimal setup, it streamlines the process of managing multiple versions and languages, adding consistent footers, and arranging build artifacts for deployment.
Features
Easy Versioning offers the following key features:
- Manage multiple documentation versions
- Support multiple languages for each version
- Add custom footers showing version and language info
- Security by ensuring a safe fallback to an existing page so users are always redirected properly
- Build documentation automatically using Sphinx for every version and language
- Organize generated HTML files into a clean, ready-to-deploy structure
Prerequisites
Make sure you have the following installed on your system:
- Python version >= 3.8
- Install the tool using
pip install easy-versioning
Directory Setup
๐ฆ Easy_versioning_Sphinx/
โโโ ๐ data/
โ โโโ ๐ Footer.md
โโโ ๐ src/
โ โโโ ๐ V. X.XX/
โ โ โโโ ๐ Language 1/
โ โ โ โโโ ๐ Language 1 Sphinx Project/
โ โ โโโ ๐ Language 2/
โ โ โโโ ๐ Language 2 Sphinx Project/
โ โโโ ๐ V. Y.YY/
โ โโโ ๐ V. Z.ZZ/
You can find a fully working example of a Footer.md file in the Example/data folder of this project.
You can start by copying the default file in your data/ folder and then customize it as you wish by modifying the CSS.
If you want to create your own Footer.md file, please follow the placeholder tags as shown in the example in the folder.
Inside the src/ folder, place all your documentation projects you want to build organized according to the directory structure shown above.
You can find a complete example project in the Example/ folder, which you can download, build, and use as a setup for your own project!
How to use it
By downloading the Example/ folder in this repository, you can access the official Easy_versioning documentation.
It includes detailed guides in Italian, English, and German, additionally, you can test the final output, as the documentation itself was built using this tool.
You can find a simple and easy documentation below:
The tool requires the directory structure shown above.
After opening a terminal in the projectโs source directory (which contains the data/ and src/ folders), run the command easy_versioning_build.
This command can be run without any arguments, or with up to two arguments:
- Default language: The fallback language and the main language of the project (default is "English"). If no arguments are provided, make sure there is an "English" folder in every version of the documentation. Choose a language that exists in all versions of your documentation.
- Cleanup flag: A boolean flag (default is True) that controls whether the
_sourcedirectory is removed from the final build to reduce the project size.- Set this flag to
0to disable cleanup and keep the_sourcedirectory.
- Set this flag to
Examples:
easy_versioning_buildโ Uses English as the default language and removes the_sourcedirectory.easy_versioning_build Italiano 0โ Sets Italian as the default language and keeps the_sourcedirectory intact.
Why Choose Easy Versioning Over Other Solutions?
| Feature | Easy Versioning Sphinx | sphinx-multiversion | sphinx-versioning | Read The Docs |
|---|---|---|---|---|
| Multi-version | โ | โ | โ | โ |
| Multi-language | โ | โ | โ | โ |
| Simplified setup | โ | โ ๏ธ Complex | โ ๏ธ Complex | โ ๏ธ Complex |
| External dependencies | ๐ซ Only Sphinx | โ | โ | โ |
| No account required | โ | โ | โ | โ (Free for OSS) |
| Usage cost | โ | โ | โ | Free for OSS, paid plans for private projects |
| Performance consistency | hardware-dependent | hardware-dependent | hardware-dependent | Can vary, higher performance require payment |
Example of the versioning footer using sphinx_book_theme
This tool is not a replacement for ReadTheDocs but rather a complementary free solution for teams who prefer to host their own documentation or require a different setup.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easy_versioning-1.0.6.tar.gz.
File metadata
- Download URL: easy_versioning-1.0.6.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
458941da3ec4517bf91120df8d34c02fe956490c4d5577173f6dd073e483a61a
|
|
| MD5 |
506df766984da0d2e44d7a7984d71571
|
|
| BLAKE2b-256 |
cfb37e158b2ffd9ef46c10ad48a0c6bca488f80c1021e8773dceb0c57371e922
|
File details
Details for the file easy_versioning-1.0.6-py3-none-any.whl.
File metadata
- Download URL: easy_versioning-1.0.6-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72c94e825c50fec28cebeeddd90db65dd6ff2e8017be310ad79cb3eb03fcf3b3
|
|
| MD5 |
d013dc9d133da2d351fb76f2f8d8920d
|
|
| BLAKE2b-256 |
2167fedf96e8cd1f759e63fd4faf5f05c41a41e5ba2481139c757cb1f8872871
|