GitBook supports monorepos. A monorepo is a repository that contains more than one logical project (e.g. an iOS client and a web application). GitBook can synchronize multiple directories from the same repository with multiple spaces. When enabling Git Sync on a space, you can configure a “Project directory”. It will be used to lookup theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GitbookIO/public-docs/llms.txt
Use this file to discover all available pages before exploring further.
.gitbook.yaml file for the directory to synchronize with this space.
Example repository structure
Here’s an example of a monorepo structure that can be synced with GitBook:packages/styleguidepackages/apppackages/api
The “Project directory” option at the Git Sync level differs from the
root option in the .gitbook.yaml configuration file. The first is used to lookup .gitbook.yaml itself, then both are combined to lookup the rest of the files in the directory. If no .gitbook.yaml exists in the “Project directory”, the synchronization will use the default configuration scoped to this directory.Updating the Project directory
Disable the existing Git Sync
Navigate to your space configuration and disable the current Git Sync connection.
Move the files in the Git repository
Move all GitBook-related files (markdown files, README/SUMMARY, and assets) to the new Project directory in your repository.
In most cases, we recommend the above steps to update the Project directory safely.