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.
This monorepo enforces Node.js 22.18.0 and pnpm 10.11.0. Use .nvmrc
for version management:
nvm use
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 (v22.18.0) - Use
.nvmrc
for version management - pnpm package manager (v10.11.0)
To create a production build:
pnpm --filter [name]-handbook build
The static site will be generated in the sites/[name]/build
directory.
To create a new handbook site from the template:
pnpm create-handbook <site-name>
This will:
- Create a new site in
sites/<site-name>
based on the template - Update the package.json with the correct site name
- Set up all necessary configurations
Example:
pnpm create-handbook my-new-handbook
After creation, you can build and start the new site:
cd sites/my-new-handbook
pnpm build:assets
pnpm start
Note: Site names can only contain letters, numbers, hyphens, and underscores.
- 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!