Demo content from demo/developer-guide (3da7905)
This commit is contained in:
parent
0d71959440
commit
13a4facbd8
2 changed files with 22 additions and 0 deletions
|
|
@ -84,6 +84,13 @@ releases_require_versioning`.
|
||||||
| `GET /api/pages/:id/releases/:version` | The frozen copy: `html`, `headings`, `tags`, `relations`, `metadata` (auto fields resolve to the release's author and date), `classification`, and a `release` object with the entry above plus `current`, the living page's version. |
|
| `GET /api/pages/:id/releases/:version` | The frozen copy: `html`, `headings`, `tags`, `relations`, `metadata` (auto fields resolve to the release's author and date), `classification`, and a `release` object with the entry above plus `current`, the living page's version. |
|
||||||
| `GET /media/<page>/<file>?release=<version>` | An attachment as it was frozen with that release. |
|
| `GET /media/<page>/<file>?release=<version>` | An attachment as it was frozen with that release. |
|
||||||
|
|
||||||
|
A page on `main` without a `version` in a versioned space counts as `0.1.0`. `GET /api/pages/:id` and `GET /api/pages/:id/review` then return
|
||||||
|
`version: "0.1.0"` with `implicitVersion: true`. `GET /api/pages/:id/versions`
|
||||||
|
lists a synthetic entry with `implicit: true` (no diff — it is today's state).
|
||||||
|
Its first release bumps from 0.1.0 and also records 0.1.0 as a real entry pointing at `main` before the merge, so the
|
||||||
|
original state can be compared from then on. A draft-only page has no
|
||||||
|
version; its first release gives `0.1.0`, or `1.0.0` with `bump: "major"`.
|
||||||
|
|
||||||
Both `releases` routes need read access only, and `404` stays ambiguous.
|
Both `releases` routes need read access only, and `404` stays ambiguous.
|
||||||
The MCP tool `read_page` takes an optional `version` to read a frozen copy.
|
The MCP tool `read_page` takes an optional `version` to read a frozen copy.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,21 @@ and permissions exclusively through the API's HTTP surface.
|
||||||
| `packages/design-tokens` | The catalog of design tokens that drives the look and feel — see [[web-frontend]]. |
|
| `packages/design-tokens` | The catalog of design tokens that drives the look and feel — see [[web-frontend]]. |
|
||||||
| `packages/git-provider` | One interface, two implementations (Forgejo, GitHub): read/write files, commits, branches, pull requests, reviews. |
|
| `packages/git-provider` | One interface, two implementations (Forgejo, GitHub): read/write files, commits, branches, pull requests, reviews. |
|
||||||
|
|
||||||
|
## Page versions in Git
|
||||||
|
|
||||||
|
In a versioned space, each approval writes `version` and a `changelog` entry
|
||||||
|
into the page's frontmatter, in a commit on the draft branch just before the
|
||||||
|
merge. Both fields are system-managed. Postgres holds `page_versions`, the map
|
||||||
|
from version to Git state for the version list and the diff; a reindex
|
||||||
|
rebuilds it by walking the file's history.
|
||||||
|
|
||||||
|
A page on `main` without `version` counts as 0.1.0, and its first approval
|
||||||
|
bumps from there; a new page's first approval gives 0.1.0, or 1.0.0 as major.
|
||||||
|
For the existing page, that approval also writes a 0.1.0 changelog entry with `ref: <sha>`, the `main`
|
||||||
|
commit before the merge. Releases are merge commits, so the commit before the
|
||||||
|
version commit is the draft, not the old `main`; `ref` lets the reindex find
|
||||||
|
the 0.1.0 state from Git alone.
|
||||||
|
|
||||||
## Release archive in Git
|
## Release archive in Git
|
||||||
|
|
||||||
Releasing a page in a versioned space can freeze it: in the same commit as
|
Releasing a page in a versioned space can freeze it: in the same commit as
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue