Write file
write_fileCreates or replaces one file on a Pagehaus site, using the Pagehaus files API (https://pagehaus.app/help/api). path is a file inside the site, such as "/about.html"; folders are created as needed. The change is public immediately, and replacing a file overwrites it. Binary files such as images are passed as base64 with encoding "base64".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path from the site's top, e.g. "/index.html" or "/blog/first-post.html". | |
| site | Yes | The site name. | |
| content | Yes | The file's contents. | |
| encoding | No | "text" (the default) or "base64". | text |