packages/ directory.
How It Works
- Scan - The system scans
packages/for subdirectories - Check - Each package is checked for a
docs/subdirectory - Include - Packages with
docs/are included in the generated documentation - Build - Navigation is built from the directory structure
Directory Structure
For a package to be autodiscovered, it must have documentation inpackages/<name>/docs/:
Package Metadata
Description
Package descriptions come from (in order):config/docs.yaml- Manual overridecomposer.json- Thedescriptionfield
Title
Package titles are derived from the package name:instructor→ “Instructor”http-client→ “HTTP Client”polyglot→ “Polyglot”
Configuration
Package Order
Control the order packages appear in navigation viaconfig/docs.yaml:
Custom Descriptions
Override package descriptions:Target Directories
Map package names to different output directories:http-client docs to packages/http/ instead of packages/http-client/.
Adding a New Package
To add documentation for a new package:-
Create docs directory:
-
Add index page:
-
Add navigation ordering (optional):
-
Regenerate documentation:
Output Structure
Generated documentation follows this structure:Packages Listing Page
A packages index page is automatically generated atpackages/index.md(x). This page:
- Lists all discovered packages
- Shows package descriptions
- Links to each package’s documentation
docs/packages.md in the project root. If this file exists, it will be used as the source (with package list appended).