Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions content/docs/deployment/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -627,17 +627,36 @@ The docs step reports what it collected, not what it attempted — a project who
successful collection prints.

Under an **ADR-0130 multi-package layout**, docs that moved into a package are
collected too: a `src/<pkg>/docs/` directory whose `<pkg>` names one of the
collected too: a `<pkg>/docs/` directory whose `<pkg>` names one of the
artifact's declared `packages[]` entries is read into **that package's own
body**, and the step line says so:
`12 collected (4 from 2 package directories)`.
The `<pkg>` directory is found from the packages the artifact registers, at
**any depth** under `src/`: `src/<pkg>/docs/` and `src/packages/<pkg>/docs/`
are one case, not two. The search descends through every directory whose name
names none of the declared packages (never into `node_modules`) and **stops**
at the first directory that names any of them. That directory is a package
root and everything under it is that package's own source, so only its own
`docs/` is read — a deeper `src/<pkg>/components/docs/` is neither read nor
reported. A stack that declares no `packages[]` has nothing to search for: its
docs are read from `src/docs/` alone, and a `src/<dir>/docs/` one level down
is reported, not read.
`<pkg>` is matched against two spellings of the package: its
`id`, and the last dot-separated segment of that `id`. The display `name` is
⛔ not a directory key — it is free to be re-worded, and a docs binding a
re-wording can break is worse than one that never existed. A directory
that matches **none** of the declared packages, or **more than one**, is still
not read — that case keeps the warning that names the files it skipped and the
spellings it tried, so it is never a silent `0 collected`.
re-wording can break is worse than one that never existed.
Docs the search finds but cannot attribute unambiguously are still not read:
each such `docs/` directory is reported in a warning that names the files it
skipped, so it is never a silent `0 collected`. Three cases lead there:

- a directory the search passes through, `src/packages/` itself included,
whose name matches **none** of the declared packages — the warning lists the
declared packages;
- a directory whose name matches **more than one** declared package — the
warning names those packages;
- one package that answers to **more than one** directory with Markdown in its
`docs/`, such as `src/core/docs/` beside `src/packages/core/docs/` — ⛔
neither is read and nothing is merged, and each warning names the others.

The resulting `dist/objectstack.json` is a **portable, self-describing deployment unit** —
you can hand it to `os start` (locally or on a server), publish it to a CDN, or fetch it
Expand Down
Loading