What a theme is
A SellAuth theme is a folder of Nunjucks templates, a settings schema, and static assets. Every storefront page is rendered server-side from your theme on each request, so themes control the full HTML output of the shop. A theme has two halves:- Templates (
.njkfiles) define the markup. schema.jsonandsettings.jsondefine what a merchant can configure without touching code, and hold the values they picked.
Quickstart
Create, pull, and edit your first theme in a few minutes.
Theme Structure
Folders, template names, and how routes map to files.
How rendering works
- A visitor requests a page, for example
/product/my-product. - SellAuth resolves that URL to a template name, for example
product. - Your theme’s
templates/product.njkis rendered with the page data (the product, feedbacks, shop settings, and so on). - The layout named in
settings.jsonfor that template, usuallylayouts/master.njk, is then rendered. The output of step 3 is passed into it astemplateContent. - The resulting HTML is returned to the visitor.
- Templates contain the page body only. The
<html>document lives in the layout. - The layout is rendered around the template rather than inherited from it. It receives the finished body as
templateContentand decides where to place it.
Themes run server-side. Anything you put in a theme file, including comments and unused settings, can end up in the response or in a file that is publicly served. Never put API keys, webhook secrets, or other credentials in a theme.
Anatomy
Ways to edit a theme
Theme CLI
Recommended. Edit files locally in your own editor, with live preview, auto-sync, and Tailwind builds.
Code editor
Built into the dashboard. Edit any theme file in the browser. Good for quick fixes without a local setup.
Visual editor
Add, reorder, and configure components without code. Driven entirely by your
schema.json.components/ with a matching entry in schema.json immediately becomes addable in the visual editor.
Official themes
New themes are usually created from an official theme, then customized. Pass the template ID to the CLI with--template:
Theme updates
When you update a theme from its official base, the official files overwrite yours. These are preserved:settings.jsonassets/custom.cssassets/custom.jstemplates/custom-page.njk
settings.json, so newly supported pages appear after an update. Existing template settings are left alone.
New settings added by an official update are not backfilled into an existing settings.json. Always read settings with a fallback, as described in Settings and Schema.