Publish files you wrote
publish_filesPublishes Markdown, HTML, CSS, or JSON files as a static site and returns its live URL; use it for text-based files written in chat.
Instructions
Publishes one or more files written here — markdown, HTML, CSS, JSON — as a site, and returns its URL. A single page goes at index.html; a single .md, .markdown or .pdf file is a site on its own, served through the documents viewer. Text only: a PDF or an image has to be published from disk with publish_dir.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Subdomain or site id to publish over. Omit to create a new site. | |
| files | Yes | The files to publish. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The live URL of the published site. | |
| files | Yes | How many files the site now serves. | |
| siteId | Yes | Identifier of the site, stable across publishes. | |
| subdomain | Yes | The site's subdomain, which is what `site` accepts. | |
| unchanged | Yes | True when every file already matched what the site served, so no new version was published. |