Skip to main content

Server Liquid Rendering

New hosted storefront themes are rendered by Shoppex, not by a browser SPA. The same core is used for:
  • live storefront cache misses
  • Builder preview
  • shoppex theme dev
  • theme validation and preview

Render Path

request
  -> Shoppex storefront edge
  -> cache lookup
  -> Shoppex Liquid renderer
  -> Liquid HTML response
The edge layer handles domains, cache, and assets. Liquid HTML is rendered by Shoppex.

Render Context

Templates receive a typed StorefrontRenderContext. The context is producer-built. It can include:
  • shop
  • settings
  • pageId
  • homeListing
  • catalogListing
  • product
  • relatedProducts
  • reviews
  • storeStats
  • services
  • platform HTML such as navigationHtml, footerHtml, and storefrontCommerceScriptHtml
Liquid reads this data. It does not compute missing stock, pricing, sorting, or checkout rules.

Bootstrap v2

Liquid pages render real HTML and a small browser boot surface. Use the platform-provided raw HTML only where expected:
{{ themeHeadHtml | raw }}
{{ bootstrapScript | raw }}
{{ storefrontCommerceScriptHtml | raw }}
Do not introduce a full browser-side store blob for Liquid themes. Liquid pages render from the server-built context.

Layout Example

<!doctype html>
<html lang="en">
  <head>
    <title>{{ shop.name }}</title>
    {{ themeHeadHtml | raw }}
    {{ bootstrapScript | raw }}
    <link rel="stylesheet" href="{{ 'assets/built.css' | assetUrl: ctx }}">
  </head>
  <body>
    {{ navigationHtml | raw }}
    <main data-shoppex-render="server-liquid" data-page-id="{{ pageId }}">
      {{ blocksHtml | raw }}
    </main>
    {{ footerHtml | raw }}
    {{ storefrontCommerceScriptHtml | raw }}
  </body>
</html>

Preview

Builder preview and CLI preview can include draft settings and preview metadata. Shoppex still builds required live slices such as catalog data, product data, reviews, and store stats.

Why This Is The Hosted Theme Model

Liquid is the hosted storefront rendering model:
  • no per-theme app bundle is required for rendering HTML
  • no custom SSR script is required
  • no hydration contract is needed for the page shell
Platform commerce JavaScript still runs in the browser for cart and checkout behavior.

Next Steps

Core Contract

Template vs producer responsibilities.

Build & Publish

Source validation, artifact creation, and publish.