Install the package

pip install sphinx-version-warning
pip install git+

Once you have the package installed, you have to configure it on your Sphinx documentation. To do this, add this extension to your Sphinx’s extensions in the file.

extensions = [
     # ... other extensions here

After installing the package and adding the extension in the file, if you build the documentation of an old version on Read the Docs, you will see a nice banner pointing to your latest release.

In case you want to show a customized banner in a specific version, see Configuration setting.