html-email-jinja
Installation
SKILL.md
HTML email with Jinja
Layout of a campaign
- Keep copy and layout apart: one folder per campaign holding
template.htmland a data file (config.jsonor YAML) with the subject, preheader, body copy and product rows. - Shared header and footer go in partials (
{% include 'partials/header.html' %}). Never paste copies into each template. - If data keys and template variable names differ, do the mapping in one function. Adding a copy field means updating that function, or the template renders nothing for it. When you rename a key, translate the old name on load so old campaigns keep rendering.
- Prefer lists and loops (
{% for p in products %}) over numbered variables (Product1_Name,Product2_Name, ...).
Email HTML rules
Email clients are not browsers. These rules are not optional: