Recipes
Task-first changes to a theme, with the exact files to edit.
Task-first guides: a change you want to make to a theme, the mechanism that does it, and the exact files to edit.
Hang an announcement at header:start without copying or editing an engine page.
Replace the product cardDraw your own card in every product grid by registering it, then overriding product:card, in app/router.tsx.
Add a home page blockWrite a block component, register it next to the default blocks, and declare its fields in twilight.json.
Add a pageWrite a route file, then list it in app/routes.ts, to serve a page of your own at /ar/about and /en/about.
Fork a built-in pageTake over one engine page: keep its loader and head, add data with extend, and render a component of your own.
Change page titles and meta tagsPass an extend function to withHead to adjust a page's title, description and meta tags without rewriting its head.
Add translation keysPut your theme's words in locales/ar.json and locales/en.json and read them with t(), with a default for missing keys.
React to cart changesListen to the SDK cart events in an effect, and remove each listener with the same function you added.
Track page viewsSend the first page view on mount and every later one from the route::changed event the engine fires after navigation.