Skip to main content
Geneva, Switzerland Call our support
English

Creating a theme

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

  1. Copy into themes/my-theme/ or install ZIP from catalog.
  2. Go to Appearance → Themes.
  3. Click Activate.
  4. 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.twig in your theme (or theme_layout())
  • Core marketing shell — Extend public/root.twig for plugin pages using core chrome

Never add templates/layouts/base.twig in core—it shadows all theme layouts.

Troubleshooting

  • Theme not listed — Invalid theme.json or missing views/ and assets/.
  • ZIP install wrong slugtheme.json slug must match catalog slug.