One file in, one URL out. Same name again is a new version.
1belt artifact publish ./deploy-failures.htmlThe file is the page content, not a whole document. It is wrapped at publish time in <!doctype html>, a <head> carrying the charset, viewport, title, favicon, a reset and the inference.sh design tokens, and a <body>. Put your own <style> and <script> at the top of the content.
A complete document is accepted too — if the file starts with <!doctype> or <html>, it keeps its own <head> and only the missing pieces are injected.
Flags
| flag | |
|---|---|
--title | page title; defaults to the file name |
--name | url slug; defaults to the title |
--desc | one-sentence description for the gallery card |
--favicon | one or two emoji, used as the tab icon |
--type | html or markdown; defaults to the file extension |
--label | a name for this version, e.g. "draft to legal" |
--id | update an existing artifact instead of creating one |
--capability | repeatable: db, user, assets |
--open | open it in the browser afterwards |
--if-version | publish only while the artifact is still on that version |
--force | publish over a newer version, discarding it |
Markdown gets GitHub-flavored rendering and a readable default typography — good for a document-shaped page.
Updating in place
Publishing the same name in your namespace, or passing --id, appends a version. The URL never changes, and viewers with the page open see the new version live.
1belt artifact publish ./report.md --id acme/q3-funnel --label "with regions"Identical content is a no-op rather than a new version.
If two people might be publishing, --if-version refuses rather than discarding whatever landed in between:
1belt artifact publish ./report.md --id acme/q3-funnel --if-version 7ffy8k1eWhat a page may load
Everything must be self-contained. There are no routes, no relative links, and no backend of your own.
External resources are restricted by CSP, and failures are silent — a blocked script simply never runs:
- scripts only from
cdnjs.cloudflare.com,cdn.jsdelivr.net/npm/,cdn.tailwindcss.com,code.jquery.com - stylesheets only from
fonts.googleapis.com, with font files fromfonts.gstatic.com - fetch, XHR and WebSocket are blocked entirely
Load libraries as pinned UMD builds, before the inline script that uses them:
1<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js"></script>Embed small images as data: URIs. For anything sizeable use assets — a data: URI costs about a third more than the bytes it carries, and the source has a 16 MiB ceiling.
Theme
The viewer's theme is stamped on the page, and the wrapper defines the inference.sh tokens as HSL triplets. Use them and the page follows the platform in light and dark:
1body { background: hsl(var(--background)); color: hsl(var(--foreground)); }Pick one approach: theme tokens only, or a fully self-defined palette that overrides every colour. Mixing the two is what produces a page that looks broken in one mode.