This repository is a monorepo containing multiple Docusaurus-based handbooks for Wonderland. Each handbook serves as a central knowledge base for specific processes, guidelines, and best practices. The monorepo structure allows for shared configuration, assets, and tooling across all handbook sites.
The monorepo uses a shared configuration system where common assets (fonts, styles, images) and configurations are centralized in the packages/common-config
package. After installation, you'll need to build these common files and copy them to your specific handbook site.
The build process works as follows:
- Install dependencies across all packages and sites
- Build common files from the shared configuration package
- Copy shared assets to the target site's
static/common/
directory (this directory is gitignored) - Start the development server for your handbook
Note: Each site can have its own static assets (like site-specific images or documents) placed directly in the static/
directory, outside of the common/
folder.
From the root of the monorepo:
pnpm install # Install all dependencies across packages/sites
pnpm --filter [name]-handbook build:assets # Build common files, and copy them into the specific site
pnpm --filter [name]-handbook start # Start the site locally
Example with the Wonderland handbook:
pnpm install
pnpm --filter wonderland-handbook build:assets
pnpm --filter wonderland-handbook start
- Node.js (v18 or higher)
- pnpm package manager
To create a production build:
pnpm --filter [name]-handbook build
The static site will be generated in the sites/[name]/build
directory.
TBD (CHA-330)
- Create a new branch for your changes
- Make your changes in the
handbook/docs
directory - If you add new folders or files, you must also update
sidebars.ts
:
- This file defines the sidebar navigation using Docusaurus sidebar configuration.
- Add your new documents to the appropriate category, or create a new one as needed.
- Test locally using
pnpm run start
- Submit a pull request
If you have any ideas for improving the handbook, feel free to open an issue (check the templates!) to start a discussion!