DevNews

Shopify Rebuilt Its Theme Layer With 93% Less Code

On this page
  1. From configuration back to markup
  2. The two new primitives
  3. The argument for markup
  4. The part worth sitting with
  5. Sources and further reading

Shopify is previewing the successor to Horizon, its current base storefront theme, and the number attached to it is a 93 percent reduction in lines of code. The mechanism is a move away from JSON heavy configuration files toward plain HTML interpolated with Liquid, Shopify's own templating language, plus two new primitives in developer preview: a composable block tag with typed parameters, and a partial tag that marks a server rendered region JavaScript can refresh on its own. The stated reason is worth arguing about. Ben Sehl, who runs product for storefronts, says models already understand HTML, and that the format is expressive and token efficient.

The short answer

Shopify is previewing the successor to its Horizon base theme, with 93 percent fewer lines of code. Templates move from JSON heavy configuration to HTML interpolated with Liquid, supported by two new tags in developer preview: block, which renders a reusable theme block with typed parameters, and partial, which marks a server rendered region JavaScript can refresh without a full reload. Twenty new validation rules cover contracts, structure and complexity. Shopify attributes the rewrite to how its Sidekick assistant edits themes, and says HTML is what models already read well.

93%fewer lines of code than Horizon
20%of Shopify merchants use Sidekick for themes
25Mtheme edits generated in 2026
Answer card: Shopify's successor to the Horizon storefront theme has 93 percent fewer lines of code, replacing JSON heavy configuration with HTML interpolated with Liquid, adding a composable block tag with typed parameters and a partial tag for server rendered regions, both in developer preview in July 2026.
A template layer rewritten because of who reads it now. Source: Shopify, reported by The Register. PNG

There is a version of this story that reads as a company doing something for AI reasons. The more interesting reading is that a company was handed a measurable excuse to fix something it already knew was bad.

From configuration back to markup

Shopify themes have been drifting toward JSON for years, and the reason was good at the time. If merchants are going to rearrange their storefront through a visual editor, the theme has to be described in something a program can manipulate safely. JSON is that thing.

The cost lands on whoever opens the file. Templates in the current Horizon theme are long structured documents describing which sections appear in what order with which settings, and reading one to answer a simple question is not a pleasant activity.

The new theme puts markup back. You open a template and you see HTML, with Liquid interpolated into it. The claim attached is a 93 percent reduction in lines of code against Horizon, which is Shopify measuring its own before and after rather than a general truth, but the shape of the saving is easy to believe: most of what disappears is configuration that existed to describe structure that the markup now describes itself.

The two new primitives

Checklist figure describing the new Shopify Liquid primitives: a block tag that renders a reusable theme block from a template and accepts typed parameters similar to component props, a partial tag defining a named region of server rendered HTML that JavaScript can refresh without a full reload, standard actions for events such as cart updates, and twenty new validation rules covering contracts, structure and complexity.
The pieces that make markup first templates workable rather than just shorter. PNG

The block tag renders a reusable theme block directly from a template, and it takes typed parameters. Anyone who has written components in a modern framework will recognise the pattern immediately: it is props, with a declared shape, which means the contract between a block and whatever renders it is written down rather than inferred from what happens to work.

The partial tag defines a named region of server rendered HTML that JavaScript can refresh without reloading the whole page. This is the part that keeps the approach honest. Going back to server rendered markup is only attractive if you can still update a cart count without a full navigation, and partial is how you do that without moving rendering into a client side framework.

Around them sit standard actions for common events such as cart updates, twenty new validation rules covering contracts, structure and complexity, and Liquid syntax that now handles Boolean expressions and literal arrays and objects. That last item sounds minor and is not: a templating language without literals pushes people into building strings, which is where the unreadable parts usually start.

Both tags are in developer preview. Shopify has not committed to a general availability date, and the reference theme is public on GitHub if you want to read the real thing rather than a description.

The argument for markup

Ben Sehl, Shopify's product director for storefronts, gives three reasons for HTML: models already understand it, it is expressive, and it is token efficient.

All three hold up. HTML is one of the most heavily represented formats in any training corpus. It is local, meaning a fragment tells you what it does without requiring the rest of the document, which matters when a model is working inside a limited window. And it says the same thing in fewer tokens than the JSON equivalent, because JSON spends characters on structure that markup gets from nesting.

The volume behind the decision is what makes it a business argument rather than an aesthetic one. Shopify says roughly twenty percent of its merchants use Sidekick for theme editing, and that those merchants generated twenty five million theme edits in 2026. At that scale, the failure rate of a model editing an awkward format is not a developer irritation. It is a support cost.

The part worth sitting with

The stated principle is that agents want what humans want: readable code, explicit contracts, helpful feedback.

That is true, and it has been true the entire time. Every one of those properties was already an argument for cleaning up a generated configuration layer, and in most organisations it was an argument that never won against shipping something else. What changed is not the engineering case. It is that agent edit success is measurable in a way that developer irritation never was, so the same work now has a number attached and the number can go in a plan.

The less flattering reading of the same facts is that fifteen years of designing formats for machines produced formats that neither humans nor machines read well, and that it took a new kind of machine to make that legible. Either way, the practical takeaway for anyone maintaining a template or configuration layer is the same: if a competent model struggles to make a small correct edit to your format, that is a measurement of your format, and you can now say so with evidence.

Sources and further reading

Frequently asked questions

What is actually changing in the new theme?

The templates stop being JSON configuration and become HTML interpolated with Liquid. In the current Horizon theme, a template directory holds long JSON structures describing which sections appear where and how they are configured, which is machine friendly and close to unreadable. In the new one you open a template and find markup. Two new Liquid tags support this: a block tag that renders a reusable theme block directly from a template and accepts typed parameters, and a partial tag that names a region of server rendered HTML which JavaScript can refresh without a full page reload.

Where does the 93 percent figure come from?

It is Shopify's own comparison of the new theme against Horizon, measured in lines of code. Treat it as what it is, a claim about one codebase against another rather than a general law about JSON versus HTML. The direction is still the interesting part: the reduction comes from deleting configuration that described structure, once the structure is expressed directly in markup that a human and a model can both read.

Are the block and partial tags available now?

They are in developer preview, and Shopify has not published a general availability date. Developer preview means you can build against them and should expect them to change. The reference theme is on GitHub under Shopify/reference-theme, which is the practical place to look if you want to see what the new shape actually reads like rather than working from a description of it.

Why would AI agents make a company rewrite its template layer?

Because a large share of theme edits are now made by an agent rather than typed by a developer. Shopify says around twenty percent of its merchants use Sidekick for theme editing, generating twenty five million edits in 2026. When that much of your editing traffic comes through a model, the readability of the format stops being a developer comfort question and becomes a reliability question. HTML is heavily represented in training data, it is local in the sense that you can understand a fragment without loading the whole file, and it costs fewer tokens than the equivalent JSON.

Does any of this transfer outside Shopify?

The general lesson does, and it is not new. Formats that are readable, explicit about their contracts and quick to give feedback are easier to work with, and that was true when only humans were reading them. What has changed is the incentive: teams that never got budget to clean up a generated configuration layer now have a measurable argument for it, because agent edit success rates are something you can put on a slide. The uncomfortable version of the same observation is that a decade of machine friendly formats produced things neither humans nor machines particularly enjoy reading.

Advertisement