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¶
Linking Between Sub-Projects¶
Remarks¶
When building a project, all other projects’
docs_root
are implicitly added to the current project’ssphinx_exclude_patterns
.