python-sphinx

How do I have multiple versions of my doc with sphinx?


Like the documentation of python or django, how do I have multiple versions of my doc with sphinx ?

I saved my doc on git, and I want my user to be able to see documentation for different version like v2.7,v3.4, etc

Thank you for the help


Solution

  • You could just use Read The Docs to host your documentation for you. They automatically handle multiple versions with a dropdown: https://docs.readthedocs.io/en/latest/index.html

    If you'd like to host your own documentation on GitHub Pages or some other web server, I made a Sphinx extension that does what you're looking for: https://github.com/sphinx-contrib/sphinxcontrib-versioning