Reputation: 320
My project has 2 versions that are actively maintained (2.x and 3.x). 3.x is newer but I am still releasing updates to the 2.x documentation.
How can I have 2 branches of my docs on ReadTheDocs? I imagine something like:
https://foo.readthedocs.io/en/2.x
https://foo.readthedocs.io/en/3.x
Currently, if someone goes to https://foo.readthedocs.io/en/latest
, they get the 2.x docs, but after 1 year I want to flip that to point to the 3.x docs.
Reading this page, it seems like I want 2 "release branches", but I cannot find more info about this.
Upvotes: 1
Views: 366
Reputation: 15045
Take a look at Pyramid's repository for how we manage branches for publishing our docs on RTD. We actively maintain three branches, master
, 1.10-branch
, and 1.9-branch
, where master
is the development branch and 1.10-branch
is the latest stable released branch.
In RTD under Admin > Advanced Settings, we currently configure "latest" as Default version and 1.10-branch
as Default branch. We also do not delete old branches. With this configuration, we publish 14 RTD "Versions" of Pyramid, from 1.0-branch
to 2.0-branch
, plus master
and latest
.
We also build pull requests as an extra check that docs build successfully because RTD sometimes updates its build environment with a new version of Sphinx.
Upvotes: 1