You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,13 @@ This repo is an **aggregator**: some doc areas are authored here in [`docs-src/`
9
9
`scripts/sync-docs` assembles a single template tree (`.vellum-src/`, gitignored) before vellum runs, from two places:
10
10
11
11
-**Local** — most areas still live in [`docs-src/`](docs-src/) in this repo.
12
-
-**Source repos** — areas listed in [`scripts/sources.json`](scripts/sources.json) are pulled from their SDK repo's `docs-site/` directory, at the git tag matching the installed package version (so prose stays aligned with the types vellum extracts). Edit those in the SDK repo, not here. Until a source repo has its `docs-site/`, sync falls back to the `local`path in the manifest, so the pilot keeps building offline.
12
+
-**Source repos** — areas listed in [`scripts/sources.json`](scripts/sources.json) are pulled from their SDK repo's configured docs directory, at the configured git ref. For Spectrum, that is `photon-hq/spectrum-ts``main` and the `docs/` directory, so prose fixes can ship without an SDK release. Vellum still extracts types from the installed package versions in this repo, so source-repo docs must stay compatible with the released package. Edit those docs in the SDK repo, not here. Local builds can use the `local`fallback in the manifest, but CI and deploy use `DOCS_SOURCE_MODE=git`.
13
13
14
14
Navigation works the same way: [`docs.json`](docs.json) is **generated** by `scripts/build-nav` from [`docs.base.json`](docs.base.json) (the site skeleton) plus a `nav.json` fragment contributed by each source. Don't edit `docs.json` directly — edit `docs.base.json` or the fragment.
15
15
16
16
## How to edit
17
17
18
-
1.**Edit the source, not the output.** Sources are `.mdx.vel` files in [`docs-src/`](docs-src/) (this repo) or a source repo's `docs-site/`. The rendered `.mdx` files and `docs.json` at the repo root are build artifacts — gitignored on `main`, only present on the `dist` branch. Don't edit them directly; they get overwritten on every deploy.
18
+
1.**Edit the source, not the output.** Sources are `.mdx.vel` files in [`docs-src/`](docs-src/) (this repo) or the source repodocs directory configured in [`scripts/sources.json`](scripts/sources.json). The rendered `.mdx` files and `docs.json` at the repo root are build artifacts — gitignored on `main`, only present on the `dist` branch. Don't edit them directly; they get overwritten on every deploy.
19
19
20
20
2.**Render and preview locally:**
21
21
@@ -42,9 +42,13 @@ Push to `main` → [.github/workflows/deploy-dist.yml](.github/workflows/deploy-
42
42
43
43
The Spectrum API reference is generated from a remote OpenAPI spec configured in [docs.json](docs.json), fetched at build time, so every rebuild picks up the latest API surface without a docs commit.
44
44
45
+
Source-repo doc updates can also trigger deploy through `repository_dispatch` type `spectrum-ts-docs`. Use that when `photon-hq/spectrum-ts` changes `docs/**` without a package release.
46
+
45
47
## Auto-updates from SDK releases
46
48
47
-
When a connected SDK ships a release (e.g., [`spectrum-ts`](https://github.com/photon-hq/spectrum-ts), [`advanced-imessage-ts`](https://github.com/photon-hq/advanced-imessage-ts)), its release workflow calls [`photon-hq/buildspace/.github/workflows/update-docs.yaml`](https://github.com/photon-hq/buildspace/blob/main/.github/workflows/update-docs.yaml). That workflow uses Claude Code to draft a `docs/update-{sdk}-v{version}` PR here, bumping the package and updating any prose or types that drifted. Older PRs for the same SDK are auto-closed by [.github/workflows/close-stale-version-prs.yml](.github/workflows/close-stale-version-prs.yml).
49
+
When a connected SDK ships a release (e.g., [`spectrum-ts`](https://github.com/photon-hq/spectrum-ts), [`advanced-imessage-ts`](https://github.com/photon-hq/advanced-imessage-ts)), its release workflow calls [`photon-hq/buildspace/.github/workflows/update-docs.yaml`](https://github.com/photon-hq/buildspace/blob/main/.github/workflows/update-docs.yaml). That workflow uses Claude Code to draft a `docs/update-{sdk}-v{version}` PR here, bumping the package so Vellum extracts the new released types. Older PRs for the same SDK are auto-closed by [.github/workflows/close-stale-version-prs.yml](.github/workflows/close-stale-version-prs.yml).
50
+
51
+
For docs-only edits in a source repo, merge the change to the source repo's `main` branch and dispatch `spectrum-ts-docs` here. Do not cut a package release just to fix prose.
48
52
49
53
To enroll a new SDK, add `.github/workflows/update-docs.yaml` to its repo following the pattern in [advanced-imessage-ts](https://github.com/photon-hq/advanced-imessage-ts/blob/main/.github/workflows/update-docs.yaml).
Copy file name to clipboardExpand all lines: scripts/sources.json
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,13 @@
1
1
{
2
-
"$comment": "Doc sources aggregated into .vellum-src before `vellum build`. Each source mounts under .vellum-src/<mount>/ (mount == page-slug prefix). `docsDir` is the source repo's Mintlify-templates directory; we use `docs-site/` (NOT `docs/`, which several repos already use for internal dev notes). `package` is the installed npm package whose version selects the git tag (`<tagPrefix><version>`) to pull docs from, keeping prose aligned with the types vellum extracts. `local` is a path under this repo used as a fallback when the repo has no docs at that ref yet (transitional) or when forced via DOCS_SOURCE_MODE=local. Per-source ref override: DOCS_REF_<name> env (dots/dashes -> underscores).",
2
+
"$comment": "Doc sources aggregated into .vellum-src before `vellum build`. Each source mounts under .vellum-src/<mount>/ (mount == page-slug prefix). `docsDir` is the source repo's Mintlify-template directory. `ref` selects the source repo revision for authored docs; use main so prose fixes can ship without package releases. `package` records the installed npm package tied to the source; Vellum still extracts types from package.json dependencies. `local` is a path under this repo used as a fallback for offline local builds or when forced via DOCS_SOURCE_MODE=local. Per-source ref override: DOCS_REF_<name> env (dots/dashes -> underscores).",
0 commit comments