|
1 | 1 | Subprojects
|
2 | 2 | ===========
|
3 | 3 |
|
4 |
| -We support the concept of Subprojects. |
5 |
| -If you add a subproject to a project, |
6 |
| -that documentation will also be served under the parent project's subdomain. |
| 4 | +Projects can be configured in a nested manner, by configuring a project as a |
| 5 | +*subproject* of another project. This allows for documentation projects to share |
| 6 | +a search index and a namespace or custom domain, but still be maintained |
| 7 | +independently. |
7 | 8 |
|
8 |
| -For example, |
9 |
| -Kombu is a subproject of celery, |
10 |
| -so you can access it on the `celery.readthedocs.io` domain: |
| 9 | +For example, a parent project, ``Foo`` is set up with a subproject, ``Bar``. The |
| 10 | +documentation for ``Foo`` will be available at: |
11 | 11 |
|
12 |
| -http://celery.readthedocs.io/projects/kombu/en/latest/ |
| 12 | +https://foo.readthedocs.io/en/latest/ |
13 | 13 |
|
14 |
| -This also works the same for CNAMEs: |
| 14 | +The documentation for ``Bar`` will be available under this same path: |
15 | 15 |
|
16 |
| -http://docs.celeryproject.org/projects/kombu/en/latest/ |
| 16 | +https://foo.readthedocs.io/projects/bar/en/latest/ |
17 | 17 |
|
18 |
| -You can add subprojects in the Admin section for your project. |
| 18 | +Adding a Subproject |
| 19 | +------------------- |
| 20 | + |
| 21 | +In the admin dashboard for your project, select "Subprojects" from the menu. |
| 22 | +From this page you can add a subproject by typing in the project slug. |
| 23 | + |
| 24 | +Sharing a Custom Domain |
| 25 | +----------------------- |
| 26 | + |
| 27 | +Projects and subprojects can also be used to share a custom domain with a number |
| 28 | +of projects. To configure this, one project should be established as the parent |
| 29 | +project. This project will be configured with a custom domain. Projects can then |
| 30 | +be added as subprojects to this parent project. |
| 31 | + |
| 32 | +If the example project ``Foo`` was set up with a custom domain, |
| 33 | +``docs.example.com``, the URLs for projects ``Foo`` and ``Bar`` would |
| 34 | +respectively be at: http://docs.example.com/en/latest/ and |
| 35 | +http://docs.example.com/projects/bar/en/latest/ |
| 36 | + |
| 37 | +Search |
| 38 | +------ |
| 39 | + |
| 40 | +Projects that are configured as subprojects will share a search index with their |
| 41 | +parent and sibling projects. This is currently the only way to share search |
| 42 | +indexes between projects, we do not yet support sharing search indexes between |
| 43 | +arbitrary projects. |
0 commit comments