Skip to content

Commit 34d2d63

Browse files
authored
Merge pull request #2801 from rtfd/subproject-docs
Add some docs on subprojects
2 parents a683272 + bd4f6e9 commit 34d2d63

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

docs/subprojects.rst

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,43 @@
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 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

Comments
 (0)