Quick Guide

What a Tringify theme is made of, how a section works and the commands from first preview to publishing.

A Tringify theme is a folder of templates, settings and assets that renders every page of a store. You write it in Vascula, a template language for HTML; it reads store data through CTX; and merchants arrange its sections and change its settings in the theme editor without touching your code. This page is the short version. Build your first theme is the full walkthrough.

What a theme is made of#

Part

What it does

Sections (sections/)

The building blocks of a page: header, hero, product, cart, footer. Each has a schema (its settings and the data it reads) and markup. Author them in src/sections/<name>/ as body.html, style.css and schema.json; tringify theme build compiles them into sections/*.vasc.

Theme blocks (blocks/)

Smaller pieces merchants add inside sections: headings, text, buttons, images.

Templates (templates/)

Which sections each page type (home, product, collection, cart…) starts with.

Settings and tokens (config/, tokens.json)

Theme-wide settings, colour schemes and design tokens that merchants change in the editor.

Locales (locales/)

Storefront text in each language, and editor labels in English, German, Spanish, French and Italian.

Demo content (demo/)

The sample catalogue used by local previews and the Theme Store.

theme.json

The theme's name, version and section list.

See Theme package structure for every file.

A section in two files#

A section declares its settings and the store data it reads in schema.json:

json
{
  "name": "product-note",
  "ctx_needs": ["product"],
  "settings": [
    {
      "id": "note",
      "type": "text",
      "default": "Ships in two days.",
      "editor": { "label": "note", "group": "content" }
    }
  ]
}

and renders them in body.html:

vascula
<p>{{ product.title }} · {{ product.price.current | money }}</p>
{% if settings.note %}
  <p>{{ settings.note }}</p>
{% endif %}

ctx_needs is the contract: a section sees only the CTX roots it lists, and the storefront loads only what the page's sections ask for. The merchant's values arrive as settings.<id>. Format prices with the money filter; never do arithmetic on money in markup.

The workflow#

bash
tringify theme init my-theme      # start from Canvas, the default theme
cd my-theme
tringify theme preview            # local preview with the demo catalogue
tringify theme build              # compile src/sections into sections/
tringify theme check              # the same checks as an upload
tringify theme dev --store STORE_ID   # live sync into an unpublished theme on a development store
tringify theme publish --listing LISTING_ID --version 1.0.0   # a new Theme Store version

Install the CLI and sign in first; see Tringify CLI. Every published version is permanent, so each update gets a new version number.

Where to go next#

To

Read

Build a theme step by step

Build your first theme

Know what the platform guarantees and requires

Theme contract

Write sections and their settings

Sections, Section schema, Section examples

Find the data a section can read

CTX

Learn the template language

Vascula

Add forms such as cart, sign-in and newsletter

Hosted Actions

Publish to the Theme Store

Publish in the Theme Store