Multiple Projects

In addition to a default project, a repository can define multiple other projects. Additional projects can be added by adding new keys to [repo_docs.projects.*] in repo.toml:

[repo_docs.projects.nested-project]
# example-begin version_selector_enabled
version_selector_enabled = false
# example-end version_selector_enabled

# docs_root should be redefined per-project
docs_root = "examples/nested-project"

# most keys can be redefined.  if a key is not redefined, it inherits the key's value
# from the root [repo_docs] table.
name = "Example: Nested Project"

# we want to link back to repo_docs from this build so we add it as a dependency
deps = [
    [ "repo_docs", "_build/docs/repo_docs/latest" ],
]

The project defined above can be found at Example: Multiple Projects in a Repo.

Default Project

When a repo has a single project, rather than defined the project under [repo_docs.projects.my_project], the user can simply add the following key under [repo_docs]:

project = "my_project"

Controlling which Project(s) to Build

By default, all projects are built. To select which project to build, use the --project flag:

repo docs --project nested-project

--project can be specified multiple times to build multiple projects.

Controlling the Project to Publish

See Publishing via the Command Line.

Linking Between Sub-Projects

See Linking Between Projects.

Remarks

  • When building a project, all other projects’ docs_root are implicitly added to the current project’s sphinx_exclude_patterns.