具有 2 个长期版本分支的 ReadTheDocs 站点
ReadTheDocs site with 2 long-term version branches
我的项目有 2 个正在积极维护的版本(2.x 和 3.x)。 3.x 较新,但我仍在发布 2.x 文档的更新。
我怎样才能在 ReadTheDocs 上拥有我的文档的 2 个分支?我想象的是这样的:
https://foo.readthedocs.io/en/2.x
https://foo.readthedocs.io/en/3.x
目前,如果有人去 https://foo.readthedocs.io/en/latest
,他们会得到 2.x 文档,但 1 年后我想将其翻转为指向 3.x 文档。
正在阅读 this 页面,我似乎想要 2 个“发布分支”,但我找不到关于此的更多信息。
查看 Pyramid's repository 了解我们如何管理分支以在 RTD 上发布我们的文档。我们积极维护三个分支,master
、1.10-branch
和1.9-branch
,其中master
是开发分支,1.10-branch
是最新稳定发布的分支。
在 Admin > Advanced Settings 下的 RTD 中,我们目前将“最新”配置为默认版本,将 1.10-branch
配置为默认分支。我们也不删除旧分支。通过这种配置,我们发布了 Pyramid 的 14 个 RTD“版本”,从 1.0-branch
到 2.0-branch
,加上 master
和 latest
.
- https://docs.pylonsproject.org/projects/pyramid/en/master/
- https://docs.pylonsproject.org/projects/pyramid/en/latest/
- https://docs.pylonsproject.org/projects/pyramid/en/2.0-branch/
- https://docs.pylonsproject.org/projects/pyramid/en/1.10-branch/
- ...等等。
我们还构建拉取请求作为文档构建成功的额外检查,因为 RTD 有时会使用新版本的 Sphinx 更新其构建环境。
我的项目有 2 个正在积极维护的版本(2.x 和 3.x)。 3.x 较新,但我仍在发布 2.x 文档的更新。
我怎样才能在 ReadTheDocs 上拥有我的文档的 2 个分支?我想象的是这样的:
https://foo.readthedocs.io/en/2.x
https://foo.readthedocs.io/en/3.x
目前,如果有人去 https://foo.readthedocs.io/en/latest
,他们会得到 2.x 文档,但 1 年后我想将其翻转为指向 3.x 文档。
正在阅读 this 页面,我似乎想要 2 个“发布分支”,但我找不到关于此的更多信息。
查看 Pyramid's repository 了解我们如何管理分支以在 RTD 上发布我们的文档。我们积极维护三个分支,master
、1.10-branch
和1.9-branch
,其中master
是开发分支,1.10-branch
是最新稳定发布的分支。
在 Admin > Advanced Settings 下的 RTD 中,我们目前将“最新”配置为默认版本,将 1.10-branch
配置为默认分支。我们也不删除旧分支。通过这种配置,我们发布了 Pyramid 的 14 个 RTD“版本”,从 1.0-branch
到 2.0-branch
,加上 master
和 latest
.
- https://docs.pylonsproject.org/projects/pyramid/en/master/
- https://docs.pylonsproject.org/projects/pyramid/en/latest/
- https://docs.pylonsproject.org/projects/pyramid/en/2.0-branch/
- https://docs.pylonsproject.org/projects/pyramid/en/1.10-branch/
- ...等等。
我们还构建拉取请求作为文档构建成功的额外检查,因为 RTD 有时会使用新版本的 Sphinx 更新其构建环境。