Operazioni di pubblicazione

6 operazioni di nome publication.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.

Aggiornato il
OperationWhat it doesPermissionConfirmation
publication.publishPublish the site: snapshot the draft (pages whose status is published, their trees, menus, collections with their published items, design system, settings, fonts) into a new live version, so the public site serves it.content.publishpublish
publication.activateMake an earlier published version of the site live again (roll back).versions.activatepublish
publication.rollbackPageRestore one page of the draft to how an earlier published version held it: its page fields, its tree and its scenes, through the tree commit, so an open editor replays it.site.editdestructive
publication.versionsList the site's published versions, newest first, limit of them (20 by default): each with its id (the versionId of publication.activate and publication.rollbackPage), its shortId (the first 8 characters, the id Pubblicazione e versioni shows: name a version to the person by it), its date (timestamp), its status, its note and whether it is the live one (isActive).site.readnone
publication.versionPagesList the pages of one published version: each with its id in that version (the pageId of publication.rollbackPage), its title and path, the draft page at the same path, and what a rollback of it would change in the draft (title, settings, content, animations; empty when the draft already matches).site.readnone
publication.pendingSay what changed since the live version, newest first: one entry per area (pages, designSystem, siteSettings, navigation, collections, fonts, ...) with the date of its latest draft edit and, for pages and collections, the changed rows.site.readnone

publication.publish

Publish the site: snapshot the draft (pages whose status is published, their trees, menus, collections with their published items, design system, settings, fonts) into a new live version, so the public site serves it. Run it alone in a batch with confirmed: ["publish"] and, as baseRevisions, the publishBaseRevisions of publication.pending (read the pending changes first, and publish what you read; a change after that read refuses it as stale); it cannot be dry-run. The answer is the new live version (shortId as Pubblicazione e versioni shows it) and changedAreas, the areas it changed against the version live before it (designSystem alone for a design-system-only change; empty when nothing changed), and draftThemes, the draft themes it put live because a published node names them (a draft theme no node names stays out); check the live result with render_preview target: "live". External effects (cache purge, screenshots) run after the commit.

permission: content.publishwrites: publication, pages, designSystem, settings, environment, apiConfig, fonts, brand, navigation, collectionsclass: externalconfirm: publishundo: explicit recovery

Esempio di input

{
  "note": "Opening section and team page"
}

Input

FieldTypeRequiredNotes
notestringnoAt most 2000 characters.

Output

FieldTypeRequiredNotes
versionobjectyes
version.idstring (uuid)yes
version.shortIdstringyesAt least 8 characters. At most 8 characters.
version.timestampstringyes
version.statusstringyesOne of "building", "ready", "failed".
version.isActivebooleanyes
version.notestringno
version.hasScreenshotbooleanno
version.hasMultipleScreenshotsbooleanno
changedAreasarray of stringyes
draftThemesarray of objectyes
draftThemes[].keystringyes
draftThemes[].labelstringyes

Un dry run rifiuta un’operazione esterna, quindi non ha una riga di prova: eseguila da sola in un batch.

publication.activate

Make an earlier published version of the site live again (roll back). Run it alone in a batch with confirmed: ["publish"]; check the live result with render_preview target: "live". External effects (cache purge, screenshots) run after the commit.

permission: versions.activatewrites: publication, pages, designSystem, settings, environment, apiConfig, fonts, brand, navigation, collectionsclass: externalconfirm: publishundo: explicit recovery

Esempio di input

{
  "versionId": "8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"
}

Input

FieldTypeRequiredNotes
versionIdstring (uuid)yes

Output

FieldTypeRequiredNotes
successtrueyes
versionIdstring (uuid)yes

Un dry run rifiuta un’operazione esterna, quindi non ha una riga di prova: eseguila da sola in un batch.

publication.rollbackPage

Restore one page of the draft to how an earlier published version held it: its page fields, its tree and its scenes, through the tree commit, so an open editor replays it. A page the draft no longer has is recreated at the same slug and parent path. The rest of the site is unchanged; publish to serve it. Run it alone in a batch with confirmed: ["destructive"]. pageId is the version's page, so the batch locks pages only; to guard the draft tree it rewrites, also pass tree:<draft page id> in baseRevisions, and a stale one is refused with 409 stale_revision.

permission: site.editwrites: pagesclass: transactionconfirm: destructiveundo: explicit recovery

Esempio di input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
  "versionId": "8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character.
versionIdstring (uuid)yes

Output

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character.
treeRevisionintegeryesAt least 0.
recreatedbooleanyes

Vuole confirmed: ["destructive"] sul batch, che la forma della CLI per una sola operazione non imposta: mettila in un file di batch ed esegui yarn splash apply <file> --dry-run.

publication.versions

List the site's published versions, newest first, limit of them (20 by default): each with its id (the versionId of publication.activate and publication.rollbackPage), its shortId (the first 8 characters, the id Pubblicazione e versioni shows: name a version to the person by it), its date (timestamp), its status, its note and whether it is the live one (isActive). Read the pages of one with publication.versionPages.

permission: site.readreads onlyclass: read

Esempio di input

{
  "limit": 10
}

Input

FieldTypeRequiredNotes
limitintegernoAt least 1. At most 100. Default 20.

Output

FieldTypeRequiredNotes
versionsarray of objectyes
versions[].idstring (uuid)yes
versions[].shortIdstringyesAt least 8 characters. At most 8 characters.
versions[].timestampstringyes
versions[].statusstringyesOne of "building", "ready", "failed".
versions[].isActivebooleanyes
versions[].notestringno
versions[].hasScreenshotbooleanno
versions[].hasMultipleScreenshotsbooleanno

Provala

yarn splash publication.versions '{"limit":10}' --dry-run

publication.versionPages

List the pages of one published version: each with its id in that version (the pageId of publication.rollbackPage), its title and path, the draft page at the same path, and what a rollback of it would change in the draft (title, settings, content, animations; empty when the draft already matches).

permission: site.readreads onlyclass: read

Esempio di input

{
  "versionId": "8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"
}

Input

FieldTypeRequiredNotes
versionIdstring (uuid)yes

Output

FieldTypeRequiredNotes
versionIdstring (uuid)yes
pagesarray of objectyes
pages[].idstringyesAt least 1 character.
pages[].kindstringyesOne of "page", "region", "template", "component".
pages[].titlestringyes
pages[].pathstringyes
pages[].draftobject | nullyes
pages[].changesarray of stringyes

Provala

yarn splash publication.versionPages '{"versionId":"8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"}' --dry-run

publication.pending

Say what changed since the live version, newest first: one entry per area (pages, designSystem, siteSettings, navigation, collections, fonts, ...) with the date of its latest draft edit and, for pages and collections, the changed rows. A changed page whose status is draft stays out of publication.publish until it is published itself; mark it with page.update. publishBaseRevisions is the baseRevisions record a publication.publish batch needs, as it is now: pass it unchanged, and a draft edit made after this read refuses the publish as stale.

permission: site.readreads onlyclass: read

Esempio di input

{}

Input

L’input è un record: vedi lo schema qui sotto.

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Output

FieldTypeRequiredNotes
neverPublishedbooleanyes
publishedAtstring (date-time) | nullyes
areasarray of objectyes
areas[].areastringyesOne of "pages", "designSystem", "siteSettings", "brandIdentity", "envVariables", "apiConfigs", "animationScenes", "navigation", "collections", "fonts".
areas[].changedAtstring (date-time)yes
areas[].itemsarray of object | objectyes
publishBaseRevisionsrecord of integeryes

Provala

yarn splash publication.pending '{}' --dry-run

Generato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente bc113be92bea5f33).

Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.

Guida di Libretto

Colophon. Questa guida è un sito Libretto: 70 pagine in due lingue, 21 pagine della guida importate da Markdown e 42 pagine di riferimento generate dal registro delle operazioni. Composta in Softcore, il codice in IBM Plex Mono. La sua struttura:

/it/ Guida di Libretto /it/start Per iniziare /it/start/request-access Richiedere l'accesso /it/start/workspace Il tuo spazio di lavoro /it/start/first-site Il tuo primo sito /it/start/invite-a-client Invitare un cliente /it/start/connect-claude Connettere Claude a Libretto /it/build Costruire /it/build/first-page Costruire una pagina /it/build/layers-and-canvas Livelli e canvas /it/build/site-components Componenti del sito /it/design-system Design system /it/design-system/tokens Colori, spazi e temi /it/design-system/components Componenti e varianti /it/design-system/fonts Tipografia e font /it/motion Movimento /it/motion/scenes Scene e ricette /it/motion/image-sequences Sequenze di immagini /it/motion/reduced-motion Movimento ridotto /it/publish Pubblicazione /it/publish/languages Le lingue del sito /it/publish/versions Pubblicazione e versioni /it/publish/members-and-forms Iscritti e moduli /it/publish/domains Domini /it/publish/redirects Reindirizzamenti /it/handover Consegnare un sito al cliente /it/glossary Glossario /it/agents Agenti e API /it/agents/mcp Server MCP /it/agents/cli CLI /it/agents/batches Batch /it/agents/errors Errori e segnalazioni /it/agents/operations Operazioni /it/search Cerca