composer hub and composer docs.
Example Sources
File:config/examples.yaml
Purpose: define where examples live (multiple roots), and the order in which sources are scanned.
- The
sourceslist order is the primary ordering for examples. - Each
packagebecomes the source id (used by grouping rules). - If the file is missing, the system falls back to
./examples. - Missing directories are ignored (no warnings).
Example Groups and Ordering
File:config/examples-groups.yaml
Purpose: define cookbook groups, subgroups, and the ordering of examples inside them.
- Group order follows the sequence in
groups. - Subgroup order follows the sequence in
subgroups. - Group titles are flattened as
Parent \\ Childfor navigation labels. - Example paths are matched against the example directory relative to the source root.
Matching rules
Rules support simple patterns:- Exact path:
A01_Basics - Prefix wildcard:
C07_Misc/Http* - Any path:
*
Exclusions
Useexclude to carve out subsets:
Navigation Behavior
- MkDocs supports nested navigation. We flatten group titles so the cookbook stays consistent across outputs.
- Mintlify supports only one level of grouping in this pipeline, so flattened titles are required.
Migration Tip
Keepexamples/boot.php at the project root. Examples can live in package directories while still including the shared bootstrap.