# Siteon documentation (full text) > Siteon is infrastructure for AI-built websites. Bring the static site (HTML) you built with Claude Code, Codex, Cursor or by hand, and one service adds Host (hosting: publish with one command, roll back to the previous version), Edit (CMS: areas your client, the business owner, can edit in the dashboard, with page-view charts), Collect (contact forms: storage, auto-replies, email/Slack notifications) and Delegate (control from AI agents via the CLI, an MCP server and API keys). Integration is one script tag plus HTML attributes; you write no JavaScript on the site. - Script to load: `https://cdn.siteon.dev/sitekit.js` (site ID in `data-site`) - Forms use `
`; input names must match the keys in forms[].fields. The hidden `_hp` anti-bot input is required - Mark editable areas with attributes such as `data-cms="."`. Declare what can be edited in schema.json - If the CMS is unavailable, the static text written in the HTML is shown as is (the site never goes down) - Hosting is included (the Free plan can publish too, with a small "Made with Siteon" badge; paid plans remove the badge and add storage): `siteon deploy ` publishes to `https://.siteun.com/` and embeds CMS values before serving. `siteon rollback` restores the previous version. Custom domains (`domains`) are coming soon - With the CLI (`siteon`), the MCP server and API keys you can create sites, apply the schema, send test submissions, review inquiries and publish. Sign-up, payment, export and account closure are self-serve too (no human paperwork) --- # Getting started > The four pillars of a foundation that keeps your site running (Host, Edit, Collect, Delegate), and how to get it working in 5 minutes (sign up → add one script line → add attributes → publish → check in the dashboard). URL: https://siteon.dev/docs Siteon is infrastructure for AI-built websites: it adds hosting, a CMS your client can edit, contact forms, analytics and control from AI agents (CLI and MCP) around static HTML built with AI or by hand, so it is ready to ship. ## What Siteon does Siteon is a foundation for publishing a finished static site (HTML) and keeping it running. AI can build how a site looks; this foundation takes on what comes after: publishing, updates, inquiries, and day-to-day operation. It doesn't matter how the site was built. HTML generated by AI and HTML written by hand work the same way. The foundation has four pillars. Use only the ones you need. - **Host — hosting** — Publish a built folder with `siteon deploy`, with CMS values filled in before delivery. Roll back to a previous version with `siteon rollback`. You can also keep your current hosting. The Free plan can publish too, at `.siteun.com` with a "Made with Siteon" badge; custom domains and badge removal come with paid plans (from $4/mo). Publishing on a custom domain is in preparation (coming soon) - **Edit — editable areas (CMS)** — The business owner can edit the areas you mark in the HTML, such as opening hours, news, and photos, from the dashboard - **Collect — inquiry forms** — Receiving and storing submissions, email and Slack notifications to the business, and thank-you emails (auto-reply) to customers. This also covers recording where ad visitors came from (`utm_*` and so on), loading GTM, an event for counting submissions as conversions, and [webhooks](https://siteon.dev/docs/webhooks) to Zapier, Make or a CRM (paid plans) - **Delegate — operation by AI agents** — With the CLI, the MCP server, and API keys, you can hand an agent everything from creating a site and applying the schema to test submissions, publishing, and checking inquiries ([CLI and MCP](https://siteon.dev/docs/cli-mcp)) Signing up, payment, issuing API keys, export, and closing your account are all self-service through the dashboard and commands. If something goes wrong, look up the symptom in [Common errors and fixes](https://siteon.dev/docs/troubleshooting). You don't write JavaScript on your site, and you don't need to add hidden fields. Add one script line and put attributes on your HTML. **If the CMS goes down, your site stays up.** When values can't be fetched, the static text written in the HTML is shown as is. So make sure the HTML text makes sense on its own. ## Get it working in 5 minutes ### 1. Register a site and get a site ID Enter your email address and you'll receive a sign-in link. Opening it creates one site on the Free plan and assigns a site ID (for example, `hanaya`). It works on development and preview domains (such as `localhost` and `*.pages.dev`) and on its Siteon hosting subdomain (`.siteun.com`). See [Plans and limits](https://siteon.dev/docs/plans) for details. ### 2. Add one script line Add it right before ``, or in `` with `defer`. Put your site ID in `data-site`. ```html ``` ### 3. Add attributes For a form, just add `data-sitekit-form` to the ``. The script handles submission. ```html ``` Add `data-cms` to the areas the business owner should be able to edit. The text inside is the default, shown as is when values can't be fetched. ```html
Open
Mon–Sat
Hours
10:00 - 18:00
``` ### 4. Define what's editable and what the form looks like in schema.json To match the HTML above, write it like this. `forms[].key` must match the form's `data-sitekit-form` value, and `fields[].key` must match each input's `name`. ```json { "locales": ["en"], "groups": [ { "key": "hours", "label": "Opening hours", "fields": [ { "key": "days", "label": "Open", "type": "text" }, { "key": "time", "label": "Hours", "type": "text" } ] } ], "forms": [ { "key": "contact", "label": "Contact", "fields": [ { "key": "name", "label": "Name", "type": "text", "required": true }, { "key": "email", "label": "Email address", "type": "email", "required": true }, { "key": "message", "label": "Message", "type": "textarea" } ] } ] } ``` The full syntax is in [Writing schema.json](https://siteon.dev/docs/schema). Apply schema.json with `siteon schema push` in the CLI or `update_schema` in MCP ([CLI, MCP, and API keys](https://siteon.dev/docs/cli-mcp)). Create additional sites with "Add site" in the dashboard or `siteon sites create`. ### 5. Publish You can publish your built folder as is. ```sh siteon hosting enable --site hanaya # first time only siteon deploy ./dist --site hanaya # published at https://hanaya.siteun.com/ ``` You can also keep your current hosting (Cloudflare Pages and others). The differences are in [Hosting and delivery](https://siteon.dev/docs/hosting). ### 6. Check in the dashboard Sign in to the [dashboard](https://app.siteon.dev) and the fields from schema.json appear as inputs. Edit a value and publish it: it reaches the site within 15 seconds with Siteon hosting, or within 1 minute with the relay or `data-embed` (no site redeploy needed). Inquiries sent from the form also arrive in the dashboard list. ## Glossary | Term | Meaning | |---|---| | Site ID | The identifier for each site. Used in the script's `data-site` and in API URLs | | schema.json | The file that declares which fields the business owner can edit and which fields each form has | | Public JSON | JSON containing the currently published content. The relay and `data-embed` read it and fill it into the HTML | | Relay | A Cloudflare Pages Function that fills values from the public JSON into the HTML before delivery | | deploy | Publishing a built folder to Siteon hosting. Each publish is called a "version" | | Primary language | The first entry in schema.json's `locales`. The language the business owner enters content in, also used when a translation is missing | ## Read next - [script tag](https://siteon.dev/docs/script) — The attribute list, and what works with the script alone - [Editable areas (CMS)](https://siteon.dev/docs/cms) — Text, photos, news lists, and multiple languages - [Forms](https://siteon.dev/docs/forms) — Messages, notifications, auto-replies, conversion tracking, and test submissions - [Webhooks](https://siteon.dev/docs/webhooks) — Send inquiries to Zapier, Make or a CRM, signed - [Scheduling](https://siteon.dev/docs/scheduling) (coming soon) — One-to-one booking for sales calls and interviews, with Google Calendar and Meet - [Handing off to AI agents](https://siteon.dev/docs/agents) — Instructions you can paste straight into Claude Code or Cursor --- # The script tag > What one script tag does (traffic-source recording, form submission, GTM) and the list of attributes. URL: https://siteon.dev/docs/script Siteon is infrastructure for AI-built websites: it adds hosting, a CMS your client can edit, contact forms, analytics and control from AI agents (CLI and MCP) around static HTML built with AI or by hand, so it is ready to ship. ## Usage Add one line with `defer`, either just before `` or in ``. ```html ``` That alone enables three things: - **Traffic-source (UTM) recording** — stores `utm_*` / `gclid` / `fbclid` for visitors arriving from ads and the like in the browser, and attaches them automatically when a form is submitted - **Form submission** — sends any `
` marked with `data-sitekit-form` without leaving the page - **GTM loading** — only when you set `data-gtm` ## Attributes | Attribute | Required | Description | |---|---|---| | `data-site` | Required | Site ID. If missing, the script **exits silently** (no error either) | | `data-locale` | | Language to fetch. Defaults to ``, then `ja` | | `data-gtm` | | GTM container ID (in the form `GTM-XXXXXXX`). Ignored if the format is wrong | | `data-embed` | | Embeds CMS values at render time. For hosting that can't use the relay; **normally leave it off** ([Hosting and delivery](https://siteon.dev/docs/hosting)) | - **The API origin is not set by an attribute.** The script connects to the origin of its own `src` (`https://cdn.siteon.dev`). If `src` is not `http(s)` (for example, when a file is opened directly), it does nothing - **Don't add `integrity` (SRI).** The script is designed to be updated without touching your site's HTML - Placing two script tags on one page is not a setup the script handles ## Recording traffic sources (UTM) When a visitor arrives from an ad link or similar, the following values are recorded in the browser's `localStorage`. | Recorded value | Contents | |---|---| | `utm_source` / `utm_medium` / `utm_campaign` / `utm_term` / `utm_content` | UTM parameters in the URL | | `gclid` / `fbclid` | Google Ads / Meta ads click IDs | | `landing` / `referrer` / `at` | Landing page, referrer, timestamp | - Two sets are kept: the first visit (first) and the most recent visit (last). They are kept for 90 days - When a form is submitted, they are saved with the inquiry. You don't need to add hidden fields - Any value longer than 500 characters is truncated - If the browser blocks `localStorage`, nothing is recorded (form submission still works) ## Loading GTM Loads the container set in `data-gtm`. ```html ``` You can also enter a GTM ID under "Settings → Advanced" in the dashboard. That route has the relay (Cloudflare Pages) inject the tag into ``, and it takes effect after the public JSON cache (60 seconds) expires. **If you set both, the injected tag and the `data-gtm` container will conflict.** On sites that use the relay, leave out `data-gtm` and set the ID in the dashboard. To track form submissions in GTM, see [Forms](https://siteon.dev/docs/forms#tracking-submissions-in-gtm). ## window.SiteKit After loading, `window.SiteKit` is available. You normally don't need to touch it. | Member | Description | |---|---| | `SiteKit.version` | Build version string | | `SiteKit.attribution()` | The recorded traffic source, or `null` if none | | `SiteKit.bindForms()` | Re-binds forms. Call it after adding forms with JavaScript | | `SiteKit.refresh()` | Re-reads the traffic source from `localStorage` | ## Caching The script (`https://cdn.siteon.dev/sitekit.js`) is cached for 5 minutes. Bug fixes reach all visitors in about 5 minutes without any change to your HTML. Conversely, it isn't suited to pinning a specific version. ## If you use CSP With only the script tag (and `data-gtm`), allow these two origins: ```text script-src 'self' https://cdn.siteon.dev https://www.googletagmanager.com; connect-src 'self' https://cdn.siteon.dev; ``` If the relay injects GTM, the inline GTM snippet goes into ``, so you need `'unsafe-inline'` or a nonce. If your site can't allow `'unsafe-inline'`, `data-gtm` is the simpler option. Add whatever the tags loaded by GTM require separately, following GTM's requirements. --- # Editable area markers (CMS) > Use data-cms attributes to let the business owner edit text, photos, news lists, article pages, and multiple languages. URL: https://siteon.dev/docs/cms Siteon is infrastructure for AI-built websites: it adds hosting, a CMS your client can edit, contact forms, analytics and control from AI agents (CLI and MCP) around static HTML built with AI or by hand, so it is ready to ship. ## How it works Add a `data-cms` attribute to an HTML element and that spot becomes editable from the dashboard. What can be edited is declared in [schema.json](https://siteon.dev/docs/schema). - The text inside the element is the **default text**. When there is no value (not entered yet, or the CMS can't be reached), the HTML stays as is - Values are escaped and inserted as text. Editors' input can never inject HTML or scripts - Values are embedded by Siteon hosting or the Cloudflare Pages relay (before delivery), or by `data-embed` (at render time) ([Hosting and delivery](https://siteon.dev/docs/hosting)) ## Marker reference | Attribute | Effect | |---|---| | `data-cms="key"` | Replaces the text inside the element | | `data-cms-html="key"` | Same replacement, with line breaks turned into `
` | | `data-cms-src="key"` | Replaces `src` on `img` / `video` / `source` | | `data-cms-attr="attribute:key"` | Replaces any attribute (e.g. `content:title`, `href:url`) | | `data-cms-blocks="key"` | Renders an article body (a sequence of blocks) inside the element | | `data-cms-hide-empty` | Removes the whole element when the value is an empty string (only with `data-cms` / `data-cms-html`) | | `