Admin and content slots

How a clone becomes client-editable: named slots, the admin panel, media, theme tokens and webhooks.

Slots

Refine replaces every text node with a slot call carrying a stable identifier and the captured text as its default:

slot("s6337616b1033", "Clone any site into a codebase you own")

At request time the identifier is looked up in the database. If a stored value exists it wins; otherwise the default renders. That is what makes a clone editable without a deploy — and it is also the single most confusing thing about working on one.

The database overrides your source. Editing the default in a component changes nothing on a page whose slot already has a stored value. Symptom: you rewrite the copy, rebuild, and the old text is still there. Fix: reseed, or edit through the admin.

Reseeding

Reseeding rebuilds the stored rows from the defaults in your components. Do it after any bulk edit to source:

xray wire ~/clones/example/site --site example --reseed

Reseeding overwrites values edited in the admin. If a client has been editing their own copy, warn them before you run it.

Slots are keyed per route

Rows are keyed by identifier and route. Renaming or deleting a route leaves rows pointing at a page that no longer exists, and a component reached from two routes needs a row for each. If you restructure routes, rebuild the rows rather than editing them by hand.

The admin panel

Wire generates an admin alongside the site, with its own login and its own deploy. It covers:

Webhooks

Content changes can fire a webhook, so a static host can rebuild or a downstream system can stay in sync. Events include slot updates, media changes, theme changes and deploy results.

Editing components directly

The output is a normal Astro project — edit it like one. Two things to know: