theme.json, views, assets, and activation.
Structure
themes/my-theme/
theme.json
views/
layouts/base.twig
page/home.twig
content/show.twig
assets/
css/app.css
js/main.js
theme.json
{
"name": "My Theme",
"slug": "my-theme",
"version": "1.0.0",
"author": "Example Co",
"parents": ["default"],
"settings": {
"accent_color": { "label": "Accent color", "type": "text", "default": "#3366ff" }
}
}
Folder name must match slug.
Activation
- Copy into
themes/my-theme/or install ZIP from catalog. - Go to Appearance → Themes.
- Click Activate.
- Active slug is stored in
cms_settings(active_theme).
Theme catalog
Themes → Browse catalog fetches struxapoint.com/struxa-dist/repo.json unless STRUXA_THEME_CATALOG_URL is set. Each entry needs slug and HTTPS download_url.
Settings in Twig
Resolved theme.json settings appear as theme_settings:
<style>:root { --accent: {{ theme_settings.accent_color|e('css') }}; }</style>
Layout choice
- Storefront — Extend
layouts/base.twigin your theme (ortheme_layout()) - Core marketing shell — Extend
public/root.twigfor plugin pages using core chrome
Never add templates/layouts/base.twig in core—it shadows all theme layouts.
Troubleshooting
- Theme not listed — Invalid
theme.jsonor missingviews/andassets/. - ZIP install wrong slug —
theme.jsonslug must match catalog slug.