Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Split Subprojects in Explanation and How-to (Diátaxis) #9785

Merged
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fe1834d
Existing text refactored into howto and explanation
benjaoming Dec 7, 2022
98405ef
Improve subproject explanation with some cases of when it's useful
benjaoming Dec 7, 2022
b5a0b28
Apply suggestions from code review by @humitos
benjaoming Dec 13, 2022
dcfd850
Merge branch 'diataxis/main' of github.com:readthedocs/readthedocs.or…
benjaoming Dec 15, 2022
a7f620b
Merge branch 'diataxis/main' of github.com:readthedocs/readthedocs.or…
benjaoming Dec 15, 2022
51f0b65
Really spell out the alias of a subproject vs. its name
benjaoming Dec 15, 2022
06d66bf
Lowercase foo and bar
benjaoming Dec 15, 2022
88539ab
Describe common searching as a main objective of using subprojects, a…
benjaoming Dec 15, 2022
91b6093
Update docs/user/subprojects.rst
benjaoming Dec 16, 2022
7d646ff
Apply suggestions from code review @ericholscher
benjaoming Dec 16, 2022
671268d
Update docs/user/guides/subprojects.rst
benjaoming Dec 16, 2022
6ec729e
Updates to Subprojects Explanation and How-to from @ericholscher feed…
benjaoming Dec 16, 2022
9c558ba
Update introduction, improvents pending...
benjaoming Dec 16, 2022
36d1518
Adds another intro paragraph
benjaoming Dec 16, 2022
be54e81
Also make *main website* emphasized
benjaoming Dec 16, 2022
b2f15c8
Update docs/user/guides/subprojects.rst
benjaoming Dec 16, 2022
0e60438
Update docs/user/guides/subprojects.rst
benjaoming Dec 16, 2022
e2152f6
Apply suggestions from code review @ericholscher
benjaoming Dec 16, 2022
5ccd208
Add mentions of subprojects in Intersphinx how-to and vice versa
benjaoming Dec 20, 2022
56ab513
Thanks PyCharm for the lovely emoji support 📝️📝️📝️
benjaoming Dec 20, 2022
87dc2cd
Make it possible to see from the main example that example-project-pl…
benjaoming Dec 20, 2022
4bff449
Rename all occurrences of foo and bar to example-project and example-…
benjaoming Dec 20, 2022
b08f8ba
Add precision to subproject create/edit form
benjaoming Dec 20, 2022
0abc008
Apply suggestions from code review by @humitos :tada: :+1:
benjaoming Dec 21, 2022
29b9006
Update docs/user/subprojects.rst
benjaoming Dec 22, 2022
f7cbdb7
Merge branch 'diataxis/main' into diataxis/relabel-subprojects
benjaoming Dec 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/user/guides/administrators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ have a look at our :doc:`/tutorial/index`.
pdf-non-ascii-languages
importing-private-repositories
Setup Build Notifications <build-notifications>
subprojects
Configure Pull Request Builds <pull-requests>
32 changes: 32 additions & 0 deletions docs/user/guides/subprojects.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
How To Add a Subproject
benjaoming marked this conversation as resolved.
Show resolved Hide resolved
=======================

This guide shows you how to add a subproject to your main project.
benjaoming marked this conversation as resolved.
Show resolved Hide resolved

.. seealso::

:doc:`/subprojects`
Read more about what the subproject feature can do and how it works.

Adding a subproject
-------------------

In the admin dashboard for your project, select :guilabel:`Subprojects` from the menu.
benjaoming marked this conversation as resolved.
Show resolved Hide resolved
From this page you can add a subproject by typing in the project slug.
benjaoming marked this conversation as resolved.
Show resolved Hide resolved

Subproject aliases
~~~~~~~~~~~~~~~~~~

You can choose an alias for the subproject when it is created.
This allows you to override the URL that is used to access it,
giving more control over how you want to structure your projects.

You can set your subproject's project name and slug however you want,
but we suggest prefixing it with the name of the main project.
benjaoming marked this conversation as resolved.
Show resolved Hide resolved

Typically, a subproject is created with a ``<mainproject>-`` prefix,
for instance if the main project is called ``foo`` and the subproject is called ``bar``,
then the subproject's Read the Docs project name will be ``foo-bar``.
When adding the subproject,
the alias is set to ``bar`` and the project's URL becomes
benjaoming marked this conversation as resolved.
Show resolved Hide resolved
``foo.readthedocs.io/projects/bar``.
2 changes: 1 addition & 1 deletion docs/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ to help you create fantastic documentation for your project.
/custom-domains
/pull-requests
/downloadable-documentation
/subprojects

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -231,7 +232,6 @@ out of your documentation and Read the Docs.
:glob:
:caption: Advanced features

subprojects
single_version
flyout-menu
feature-flags
Expand Down
42 changes: 27 additions & 15 deletions docs/user/subprojects.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Subprojects
===========
Organizing multiple projects in one site: Subprojects
benjaoming marked this conversation as resolved.
Show resolved Hide resolved
=====================================================

Projects can be configured in a nested manner, by configuring a project as a
benjaoming marked this conversation as resolved.
Show resolved Hide resolved
*subproject* of another project. This allows for documentation projects to share
a search index and a namespace or custom domain, but still be maintained
independently.

For example, a parent project, ``Foo`` is set up with a subproject, ``Bar``. The
documentation for ``Foo`` will be available at:
This is useful for:

* Organizations that need all their projects visible in one documentation portal or landing page
* Projects that document and release several packages or extensions
* Organizations or projects that want to have a common search function for several sets of documentation

For example, a parent project, ``foo`` is set up with a subproject, ``bar``. The
documentation for ``foo`` will be available at:
benjaoming marked this conversation as resolved.
Show resolved Hide resolved

https://foo.readthedocs.io/en/latest/

The documentation for ``Bar`` will be available under this same path:
The documentation for ``bar`` will be available under this same path:

https://foo.readthedocs.io/projects/bar/en/latest/

Adding a subproject
-------------------
.. seealso::

In the admin dashboard for your project, select "Subprojects" from the menu.
From this page you can add a subproject by typing in the project slug.
:doc:`/guides/subprojects`

Subproject aliases
~~~~~~~~~~~~~~~~~~

You can use an alias for the subproject when it is created. This allows you to override the URL that is used to access it, giving more configurability to how you want to structure your projects.

Sharing a custom domain
-----------------------
Expand All @@ -34,8 +34,8 @@ of projects. To configure this, one project should be established as the parent
project. This project will be configured with a custom domain. Projects can then
be added as subprojects to this parent project.

If the example project ``Foo`` was set up with a custom domain,
``docs.example.com``, the URLs for projects ``Foo`` and ``Bar`` would
If the example project ``foo`` was set up with a custom domain,
``docs.example.com``, the URLs for projects ``foo`` and ``bar`` would
respectively be at: https://docs.example.com/en/latest/ and
https://docs.example.com/projects/bar/en/latest/
benjaoming marked this conversation as resolved.
Show resolved Hide resolved

Expand All @@ -46,6 +46,18 @@ Adding a custom domain to a subproject is not allowed,
since your documentation will always be served from
the domain of the parent project.

Separate release cycles
-----------------------

When several projects are documented in the same space, it's common that they follow separate release cycles.
benjaoming marked this conversation as resolved.
Show resolved Hide resolved

We recommend that the documentation follows the release cycle of whatever it is documenting.
By using subprojects, you can present your documentation for several projects with separate release cycles.
This is solved by having the :term:`flyout menu` active for the project that's viewed.

When the user navigates to a subproject,
they are presented with a :term:`flyout menu` matching the subproject's versions and :doc:`/downloadable-documentation`.
ericholscher marked this conversation as resolved.
Show resolved Hide resolved

Search
------

Expand Down