Set a post's own layout
set_post_layoutOn one site of the account, named in site. A layout for this one post, in Liquid: it receives post and the site's names, as a theme's custom-.liquid does, and may render the theme's partials. Print {{ post.content }} in it, itself: that is the post's text, and the paywall for a reader the post is not for. For a look that many posts share, a theme file is better: custom-.liquid with write_theme_file (an admin's). Markup and CSS only: no script, iframe, form, on* attribute or javascript: address; a element applies inside the layout alone, with no url() off this site, no @import and no position: fixed. A save that has any of these is refused with what to change, and the site cleans what it shows in any case. A layout that fails shows the theme's post. Answers the post's facts with its preview link: look at it there. liquid "" removes the layout.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site": "<site>",
"post_id": "<post_id>",
"liquid": "<liquid>"
},
"name": "set_post_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The site to work on, as list_sites names it | |
| liquid | Yes | The layout's Liquid; "" removes it | |
| post_id | Yes |