layouts_push
Deploy layout and asset files from a local tree to Voog by reading manifest.json and PUTting each file to its mapped endpoint. Ensures byte-exact .js/.css uploads, avoiding JSON escape decoding issues.
Instructions
Read manifest.json + tracked files from target_dir and PUT each to the endpoint its manifest type maps to: type=layout → /layouts/{id} {body}, type=asset (legacy: layout_asset) → /layout_assets/{id} {data}. Optional files=["javascripts/app.js", ...] filter pushes only the named relative paths; files=null (or omitted) pushes every manifest entry. THE BYTE-EXACT WAY to deploy a .js/.css asset: content is read from disk here, whereas a string passed to layout_asset_update crosses a JSON boundary that decodes literal \uXXXX escapes in the source (issue #138). A PUT that returns 200 without persisting is reported as a failure, not a ✓. Returns per-file success/failure breakdown; missing files and PUT errors are captured per-entry and do not abort the remaining pushes. Recommended pre-flight: site_snapshot for full backup before a mass push.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | Site name from voog_list_sites | |
| files | No | Optional list of relative paths to push (e.g. 'layouts/default.tpl'). Null/omitted = push all manifest entries. | |
| target_dir | Yes | Absolute path of a previously-pulled tree (must contain manifest.json) |