publish_html
Publishes HTML or Markdown content as a shareable BrewPage URL for free no-signup hosting, with password protection, custom expiry, and optional filenames. Share the returned link.
Instructions
Publish HTML or Markdown content to BrewPage (repository default limit 5 MiB). Returns its primary share link and owner token. Supports password protection, custom TTL, optional filename, and an opt-in top toolbar (showTopBar). When deliveryMode is omitted for a public page, the server may publish it on its own subdomain if the page needs browser features a BrewPage link does not provide; the result then includes deliveryModeReason and a delivery notice. Markdown raw HTML is allowlisted: scripts, styles, event handlers, forms and embeds are removed. Always share the returned URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Content format, default HTML. HTML or MARKDOWN; the server also maps aliases (md, text/markdown, file extensions, code languages) and detects unknown values from content, reporting the change in notices. | HTML |
| content | Yes | HTML or Markdown content to publish | |
| ttlDays | No | Requested TTL: days as a number, or a string such as '2w', '36h' or '1 month' (default 15 days). The server rounds to whole days and clamps to the allowed range (1-30 by default; owner caps differ), reporting each adjustment in notices; use returned expiresAt. | |
| filename | No | Optional original filename (≤200 chars). Used as title fallback when no <title>/<h1>; immutable on update. | |
| password | No | Optional password to protect the page | |
| namespace | No | Optional. Omit to generate an unlisted namespace: anyone with its unpassworded link can read it, but it is excluded from gallery/search. Pass a custom namespace to group unlisted content, or pass `public` ONLY when the user explicitly wants gallery/search eligibility. Password-protected content stays excluded; unlisted, protected or otherwise ineligible native responses carry noindex; eligible public HTML, sites and files may permit indexing. | |
| showTopBar | No | Add a thin top toolbar (filename + Download button + theme toggle) on the served page. Default: hidden. | |
| deliveryMode | No | Optional delivery choice for a fresh publication, independent of password/namespace. Fresh sites and HTML-format pages outside public (including the default unlisted namespace) always use subdomain; an explicit path there still publishes, on subdomain, with a delivery notice. Everything else in any namespace (Markdown, code/text, files, JSON, KV, public HTML) defaults to path (Promotion); public HTML may automatically choose subdomain for browser features. When creation returns an existing publication, it keeps its actual mode and URL. |