Skip to content

Commit ea8d2f2

Browse files
committed
Add some docs on subprojects
Clarify usage around subprojects, how they can be used, and other features.
1 parent f5d5081 commit ea8d2f2

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

docs/subprojects.rst

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,42 @@
11
Subprojects
22
===========
33

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.
78

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:
1111

12-
http://celery.readthedocs.io/projects/kombu/en/latest/
12+
https://foo.readthedocs.io/en/latest/
1313

14-
This also works the same for CNAMEs:
14+
The documentation for ``Bar`` will be available under this same path:
1515

16-
http://docs.celeryproject.org/projects/kombu/en/latest/
16+
https://foo.readthedocs.io/projects/bar/en/latest/
1717

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 id of the project.
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 the only way to share search indexes, they
42+
are not shared between arbitrary projects.

0 commit comments

Comments
 (0)