Publish a website
Put a page online from PopCraft at its own address, publish new versions, go back to an earlier one, and take the site offline. From the editor, the command palette, the AI agent, the command line and the API.
Publishing puts a page of a Web file online. Every top-level frame becomes a page at its own address, and anyone with the site's address can open it. It is the same site Export › Website (static files) downloads: Publish uploads the files and serves them for you.
You need to be signed in. A file that is only on this device is saved to your account by its first publish.
Publish
Description
The website template in the editor, signed in. The Publish button in the top bar opens the Publish dialog. An address is typed, Publish is clicked, the files upload, and the dialog shows the site's link with Version 1 marked Live. The published site is then opened on its own: the landing page shows, and clicking Pricing in its navigation goes to the pricing page.
- Click Publish in the top bar.
- Type the site's Address: 3 to 40 letters, digits and dashes. It is the name before the site domain.
- Click Publish. The site is built, its files are uploaded, and it is online.
- Click the link in the dialog to open the site.
The dialog then shows the site's link and Version 1, marked Live.
Sites with forms need a database
A published site keeps what visitors send through its forms only in a database you attach: a Neon or Supabase database of your own. Without one, nothing is saved. Visitors are not shown the thank-you: they see a notice that their answer did not go through, and the form keeps what they typed.
The Publish dialog warns you when the page has forms and the site has no database, and its Database section
connects one in a click. You can still publish without one. A file that is only on this device gets the section after
its first publish. The AI agent and the command line get the same warning in what publish.site returns
(formsUnsaved).
A static copy of the site served from another host has nowhere to send its forms either, so its visitors see the same notice.
Publish again, go back, take it offline
Description
A website that is already published as Version 1. The headline is changed on the canvas, the Publish dialog is opened from the ⋯ menu and Publish again makes Version 2, which goes live. Make live on Version 1 puts the earlier version back; Take offline stops the site; Make live on Version 2 puts the new one online again. The site is then opened on its own and shows the new headline.
Every publish is a version of its own, and stays exactly as it was.
| You want | Do |
|---|---|
| Put your latest design online | Publish again. Only the files that changed are uploaded. |
| See an earlier version | Click Version N in the list. Each version has an address of its own. |
| Go back to an earlier version | Make live on that version. Visitors get it from now on. |
| Stop serving the site | Take offline. The address stops answering; the versions are kept. |
| Put it back | Make live on any version. |
| Change the address | Type a new one and Publish again. |
Choose the share image
When someone pastes the site's link into a chat or a social post, the preview shows a picture: the site's share
image (its og:image). Set it under Share image in the Publish dialog:
| Choice | What links show |
|---|---|
| First screen (the default) | The site's first screen, drawn at 1200×630 from its top. |
| A frame | A frame of the file you pick. A 1200×630 frame, such as a social link-preview template, fits exactly; a frame of another shape is covered from its top. |
| Upload | A PNG or JPEG you upload, under 1 MB. 1200×630 fits best. |
Preview draws the picture as the next publish will. The picture is drawn and uploaded with the site's other
files every time you publish (as share/og.png, or share/og.jpg when a PNG would be over 1 MB), so it follows your
latest design. Every page carries og:title, og:description, og:url, og:type, og:image,
twitter:card (summary_large_image) and twitter:image, with absolute addresses on the site's own domain.
A page can have a share image of its own. Select the screen (a top-level frame), and in the inspector's page settings
pick a frame under Page share image (Same as the site goes back to the site's); Preview draws it as a
publish will. Links to that page then show that frame instead. The agent does the same with set_route and
shareImage (a frame's id).
To test it, publish, then open the site's address with a link-preview checker (the debuggers of the big social
networks, or any Open Graph preview tool), or look at the page's source: the og:image address opens the picture.
Manage a team's websites
On Home, open the Market tab. Its Websites list shows every site the team in the sidebar has published, and how many its plan allows. Pick My files or a team in the sidebar to see that team's.
| You want | Do |
|---|---|
| Open the design | Open file |
| Stop serving it | Take offline. The versions are kept. |
| Serve it again | Put online: the latest version goes back up. |
| Free its place in the plan | Delete (the bin). Every version and the address go, and the storage its files used is freed; the file stays, and so does anything sent to GitHub or Vercel. |
A published site's files (its pages, pictures, scripts and share images) count toward the team's storage, with its media. A file that did not change between versions is stored, and counted, once; every version kept for going back counts until the site is deleted. Taking a site offline keeps its versions, so it does not free the space. A publish that would go over the plan's storage is refused before anything is uploaded.
A site whose file is in the trash is still online until you take it offline or delete it. The same tab lists the team's plugins and theme packs, templates, brushes and shaders, and Library lists the component libraries it publishes.
Send it to your own GitHub or Vercel
Under Also send to in the Publish dialog, a published version can be pushed to a repository of yours on GitHub or deployed to a project of yours on Vercel. Connect the account first, in Integrations.
Where to find Publish
Description
The website template in the editor, signed in. Publish is opened four ways, each showing the same Publish dialog: the Publish button in the top bar; Publish website… in the ⋯ menu; the rocket button in the web preview's header; and the command palette, where typing publish finds Publish website….
| Where | How |
|---|---|
| Top bar | The Publish button. A Web file has it. |
| ⋯ menu | Publish website…, in every kind of file. |
| Play menu | The arrow beside Play → Publish website… (Web files). |
| Web preview | The rocket button in the preview's header. |
| Command palette | Press ⌘K (Ctrl K), type publish, choose Publish website…. |
Ask the AI agent
The agent can publish for you. Ask in words:
Publish this page as a website at launch-day.
Is this file published? Which version is live?
Put version 1 back online.
Take the site offline.
Which of our websites are online? Delete the old landing page's.
It asks you to approve before it publishes, changes the version online or takes the site down. Reading the status needs no approval.
| Tool | What it does |
|---|---|
publish_site | Publish the current page as a new version. Takes an optional address. Returns the site's URL. |
set_site_version | Serve another version (version: 2), or take the site offline (version: null). |
get_site_status | The address, the version online and the versions so far. |
list_published_sites | Every website a team has published, whether each is online, and how many the plan allows. |
delete_published_site | Delete a file's website for good (fileKey, or the open file's). |
set_share_image | Choose the share image: source auto, frame (with frameId) or image (with imageUrl). |
From the command line
With the desktop app running, popcraft run --ui runs the same commands in the open file, as you.
The terminal asks you to approve the two that change what is online; --yes approves without asking.
popcraft run --ui publish.site --address launch-daypopcraft run --ui publish.status --jsonpopcraft run --ui publish.setVersion --version 1popcraft run --ui site.setShareImage --source frame --frameId FRAME_IDpopcraft commands publish.site prints a command's flags.
From the API
A personal access token with the sites:publish scope can publish, roll back and take a site offline;
files:read can read its status. The endpoints are in the reference.
curl -H "Authorization: Bearer $POPCRAFT_TOKEN" https://popcraft.app/api/v1/files/KEY/sitecurl -X PATCH -H "Authorization: Bearer $POPCRAFT_TOKEN" -H "Content-Type: application/json" \
-d '{"currentVersion": 1}' https://popcraft.app/api/v1/files/KEY/sitecurl -X PATCH -H "Authorization: Bearer $POPCRAFT_TOKEN" -H "Content-Type: application/json" \
-d '{"currentVersion": null}' https://popcraft.app/api/v1/files/KEY/sitePublishing a new version through the API takes the site's files, because the server does not draw the design. Export them, then upload:
- Export the files:
popcraft run site.popcraft export.web --format site --out site.zip, and unzip. POST /files/{key}/site/publishwith every file's path, SHA-256 and size. The reply lists the hashes that aremissing.PUT /files/{key}/site/blobs/{hash}?path=…for each missing file.POST /files/{key}/site/publishagain with"commit": true. The reply has the version and its URL.
Limits
- A site holds up to 2,000 files and 200 MB; one file up to 20 MB. The share image is one of its files.
- Your plan sets how many sites a team can have. A site counts while it exists, online or offline; delete it (Home › Market) to free its place. A new version of a site you already have does not count.
- Anyone with the address can see a published site. Do not publish what should stay private.