Publishing Artifacts

One file in, one URL out. Same name again is a new version.

bash
1belt artifact publish ./deploy-failures.html

The 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
--titlepage title; defaults to the file name
--nameurl slug; defaults to the title
--descone-sentence description for the gallery card
--faviconone or two emoji, used as the tab icon
--typehtml or markdown; defaults to the file extension
--labela name for this version, e.g. "draft to legal"
--idupdate an existing artifact instead of creating one
--capabilityrepeatable: db, user, assets
--openopen it in the browser afterwards
--if-versionpublish only while the artifact is still on that version
--forcepublish 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.

bash
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:

bash
1belt artifact publish ./report.md --id acme/q3-funnel --if-version 7ffy8k1e

What 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 from fonts.gstatic.com
  • fetch, XHR and WebSocket are blocked entirely

Load libraries as pinned UMD builds, before the inline script that uses them:

html
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:

css
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.

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.