Write site files
write_site_filesPush files (HTML/CSS/JS/images) into a site's DRAFT — use this when YOU are writing the code yourself instead of asking sitectrl's AI. Text files go in 'content'; binary files (images/fonts) in 'content_base64'. Max 40 files/call, 2 MB/file. Keep the include on every HTML page (the site's built-in private analytics — publish re-adds it if missing). Use clearly-marked placeholder contact info unless the user provided real details. For working forms, POST to /_sc/form/submit with a hidden _form name field — submissions reach the owner's dashboard + email (never use mailto:). Follow with publish_site to go live.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| files | Yes |