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

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:

  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.6.tar.gz (12.9 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.6-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

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

Hashes for easy_versioning-1.0.6.tar.gz
Algorithm Hash digest
SHA256 458941da3ec4517bf91120df8d34c02fe956490c4d5577173f6dd073e483a61a
MD5 506df766984da0d2e44d7a7984d71571
BLAKE2b-256 cfb37e158b2ffd9ef46c10ad48a0c6bca488f80c1021e8773dceb0c57371e922

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for easy_versioning-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 72c94e825c50fec28cebeeddd90db65dd6ff2e8017be310ad79cb3eb03fcf3b3
MD5 d013dc9d133da2d351fb76f2f8d8920d
BLAKE2b-256 2167fedf96e8cd1f759e63fd4faf5f05c41a41e5ba2481139c757cb1f8872871

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