Publish a folder
publish_dirPublishes a folder from disk and returns its URL. The folder needs an index.html at its root, or documents (.md, .pdf, .docx, .xlsx, .epub), which are served through the reader.
Instructions
Publishes a folder from disk and returns its URL. The folder needs an index.html at its root, or documents (.md, .pdf, .docx, .xlsx, .epub), which are served through the reader.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the folder to publish. | |
| site | No | Subdomain or site id to publish over. Omit to create a new site. | |
| folder | No | Folder to file the new site in, when the person asked for one: its path of names such as Clients/Acme, or its id from list_folders. Only for a new site — do not pass it together with `site`; moving an existing site is update_site's `folder`. It never creates a folder: a folder that does not exist is refused with the list of those that do, and nothing is published. | |
| subdomain | No | Subdomain to create the new site under, when the person asked for a particular address. Only for a new site: leave it out to publish over an existing one, and do not pass it together with `site`. Ask rather than inventing one — the name is the URL somebody will be given, it cannot be changed afterwards, and an unused site made under a guessed name has to be deleted by hand. |
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. |