Operazioni sulle impostazioni
2 operazioni di nome settings.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| settings.read | Read the draft site settings, key by key: the theme's setting fields (companyName, legalLine, supportEmail, logoWidth, socialImage, favicon, the analytics and consent keys analyticsProvider, analyticsSiteId, analyticsHost, consentPolicyVersion, ...), blockReveal (the reveal every block of the page's sections, or the footer's, plays), styleBreakpoints (the list breakpoints.update replaces; absent while the site keeps the defaults) and redirects (the list redirects.update replaces). | site.read | none |
| settings.update | Write site settings key by key: each key of the input replaces that setting and the others stay. | site.edit | none |
settings.read
Read the draft site settings, key by key: the theme's setting fields (companyName, legalLine, supportEmail, logoWidth, socialImage, favicon, the analytics and consent keys analyticsProvider, analyticsSiteId, analyticsHost, consentPolicyVersion, ...), blockReveal (the reveal every block of the page's sections, or the footer's, plays), styleBreakpoints (the list breakpoints.update replaces; absent while the site keeps the defaults) and redirects (the list redirects.update replaces).
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| settings | record of any JSON | yes |
Provala
yarn splash settings.read '{}' --dry-runsettings.update
Write site settings key by key: each key of the input replaces that setting and the others stay. The analytics and consent keys are checked together on the result (an unknown provider, a site id of the wrong shape is refused), and blockReveal against its contract (null clears it). styleBreakpoints, the layout frames and redirects are refused here: use breakpoints.update, layout.update and redirects.update. Settings are versioned: the public site serves them after the next publish; undo restores the previous values.
Esempio di input
{
"siteTitle": "Studio"
}Input
L’input è un record: vedi lo schema qui sotto.
{
"type": "object",
"propertyNames": {
"$ref": "#/$defs/__schema0"
},
"additionalProperties": {
"$ref": "#/$defs/__schema1"
},
"$defs": {
"__schema0": {
"type": "string",
"minLength": 1
},
"__schema1": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema1"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema1"
}
}
]
}
}
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| settings | record of any JSON | yes |
Provala
yarn splash settings.update '{"siteTitle":"Studio"}' --dry-runGenerato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 6a1af3352873911a).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.