Install the CLI
1
Install Slurp
slurp for build and validate, and slurp-dev
for the preview server.Create the theme
1
Create the directories
site/ is the theme root. The parent directory holds build tooling, which
is not published.2
Write the manifest
site/theme.json identifies the directory as a ByteSell theme.site/theme.json
schema: 2 enables theme-level blocks and @theme targeting. builder
selects the merchant’s editing surface; full is the default.3
Add a layout
Pages share this shell. Script and stylesheet URLs come from
platform
rather than literal paths.site/layouts/base.slurp
4
Add an editable section
The
section { } frontmatter becomes a form in the builder.site/sections/Hero.slurp
data-bs-edit makes an element editable in place. Its value is the settings
key written back to.5
Add the page
A page places
{sections} without naming which sections go there. The
merchant controls that, starting from the defaults in the next file.site/pages/index.slurp
An element form,
<layout src="@layouts/base">, also exists. Prefer the
block form. The element form builds its node with no head slot, so a
{head} block inside it renders in the body, where those tags have no
effect.6
Add default content
templates/index.json supplies the content a store starts with when the
theme is installed. Its filename matches the page.site/templates/index.json
type matches sections/Hero.slurp. Omitted settings fall back to the
schema defaults.7
Write the stylesheet
site/css/theme.css
base.slurp links this file, so it must be present in the bundle.
Publishing rejects a theme whose linked stylesheet is missing. Most themes
generate it with Tailwind and commit the output.Render it
slurp build has no store to query, so the platform URLs are supplied
directly:
dev-globals.json
dist/pages/index.html is the full document, with ${ storefront.name } and
every ${ platform.* } resolved:
dist/pages/index.html
Use the
slurp-dev binary, not slurp dev. The subcommand forwards only
--port and --fixtures, so it cannot pass --globals, and the platform
URLs resolve empty.{sections} in a static build
<main></main> above is expected. Section content lives in the merchant’s
database and slurp build has no store to read, so {sections} renders
nothing. templates/index.json is applied when a store installs the theme, not
at build time.
To render a section template, pass a section object directly. It is an
ordinary context key:
preview-globals.json
dist/sections/Hero.html
slurp build writes an HTML file for every .slurp outside components/ and
layouts/, which accounts for dist/sections/Hero.html. Those are local build
output and are not part of the published bundle.
Deploy to a store
Themes deploy from GitHub. There is no upload.1
Push the repository
Commit everything, including
site/css/theme.css.2
Connect it
In the dashboard, open My Store, connect the GitHub repository and
select the branch. ByteSell reads the tree, locates the directory containing
theme.json and validates it before accepting the connection.3
Push again
Every push to that branch redeploys. Check the deploy status, then set the
theme live.
no theme.json manifest at the theme root and theme.json found, but no .slurp files in this folder - is it the right one?.
Next
Pages and routing
Dynamic routes and special pages.
Sections and blocks
Nested blocks, zones and default content.
Store data
The
storefront object and fetching products.Publishing
Versioning, the schema gate, and every rejection.