Skip to main content

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

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:

  1. 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.
  2. Cleanup flag: A boolean flag (default is True) that controls whether the _source directory is removed from the final build to reduce the project size.
    • Set this flag to 0 to disable cleanup and keep the _source directory.

Examples:

  • easy_versioning_build โ€” Uses English as the default language and removes the _source directory.
  • easy_versioning_build Italiano 0 โ€” Sets Italian as the default language and keeps the _source directory 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


Versioning Example



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

easy_versioning-1.0.3.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_versioning-1.0.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file easy_versioning-1.0.3.tar.gz.

File metadata

  • Download URL: easy_versioning-1.0.3.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for easy_versioning-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c6384df64549ffd8ff61437837b546b0fb240b7aa4e06b86da294020d7d55d34
MD5 de77f43b52ac879c2ef14499dd3016e4
BLAKE2b-256 6abf5ccfe0171c10197de66275887586d35b98c61eeb6b52e4963cbb4d86fb59

See more details on using hashes here.

File details

Details for the file easy_versioning-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_versioning-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f0abe9396a1b1007be3114bb4ee9c3b0badc44e9cde91a169a465d6d447f25b2
MD5 04b91d0fcd1343e4dfb589a0dbe3cf59
BLAKE2b-256 7e68d64d433365fcdbb675e4ecebf21ad22677c60e750f30b185f1609a6e718b

See more details on using hashes here.

Supported by

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