Email directory structure
Finqu email themes use a six-folder directory layout similar to storefront themes.
Directory overview
assets/
Email themes support .scss.liquid and .css.liquid stylesheets in assets/. Finqu compiles these files automatically and exposes the compiled CSS strings in the global styles array.
Inject compiled styles inside <mj-head> in your layout:
{%- for style in styles -%}
<mj-style>
{{ style }}
</mj-style>
{%- endfor -%}Keep rules simple because email clients support a limited subset of CSS.
config/
Store reusable theme configuration values in config/settings_data.json so stylesheets and templates can read them without hardcoding colors or brand settings.
layout/
Every email theme must include layout/theme.mjml.liquid. You can add extra layouts (such as layout/campaign.mjml.liquid) and assign them at the top of a template:
{%- layout 'campaign' -%}locales/
Add one JSON file per supported language (for example locales/en.json and locales/fi.json). If no locale matches the recipient’s language, Finqu falls back to English.
Define keys in locales/en.json:
{
"my_key": "My translation",
"greeting": "Hi {{ name }}!"
}Render plain and interpolated translations in templates:
{{ 'my_key' | t }}
{%- assign name = "Example Name" -%}
{{ 'greeting' | t: name: name }}The second expression outputs Hi Example Name!.
snippets/
Extract repeated MJML elements into snippets/ and include them with {% render %}.
snippets/cta-button.liquid:
<mj-button color="blue">{{ button_text }}</mj-button>Usage in a template:
{% render 'cta-button', button_text: 'Click me!' %}Rendered MJML output:
<mj-button color="blue">Click me!</mj-button>templates/
Each file in templates/ maps to a supported transactional email event. See Email templates for supported paths, contexts, and variables.
Example directory layout
email-theme/
├── assets/
│ └── main.scss.liquid
├── config/
│ └── settings_data.json
├── layout/
│ └── theme.mjml.liquid
├── locales/
│ └── en.json
├── snippets/
│ └── cta-button.liquid
└── templates/
└── orders/
└── confirmation.mjml.liquid