Liquid Theme Package Format
A Liquid theme package is source text plus assets. Shoppex validates it, stores the source package privately, serves public assets from the immutable artifact prefix, and renders pages with the shared Liquid core.Required File Tree
theme-package.json
This file is mandatory. It declares every template and asset the renderer may use.
Block Registry
blocks maps Builder block types to Liquid templates.
Common fields:
| Field | Meaning |
|---|---|
kind | static for normal sections, snippet for reusable/rendered fragments |
template | Declared Liquid file path |
requiredContext | Optional live context slice such as product, homeListing, catalogListing, reviews, or storeStats |
product before the section renders.
Builder Markers
Every renderable section root must include:Safe Liquid Rules
Merchant packages are treated as untrusted. Validation rejects:- undeclared templates or assets
- dynamic partials such as
{% render section.partial %} - path traversal
- executable files such as
.js,.ts, or.tsx <script>, inline event handlers,javascript:URLs, and unsafe embeds- oversized packages
Assets
assets/built.css is the required published stylesheet. It should be built from CSS that scans the Liquid sources.
Use assetUrl for theme assets:
safe_href for user-controlled URLs:
Next Steps
Core Contract
What templates may do and what TypeScript producers must own.
Build & Publish
How Shoppex validates, stores, renders, and serves Liquid packages.