mjml-template-syntax
v1.0.0
Published
Safe, unmodified, templating syntax in MJML emails
Downloads
1
Readme
mjml-template-syntax
A MJML plugin adding more compatible parent tags than the mj-raw
component for ignoring contents.
The result should be only the contents of the <mj-template-syntax></mj-template-syntax>
tags and nothing else.
This idea came around because we needed to be able to bake in Jinja2 template syntaxes into an MJML template.
It would be nice if random control template strings didn't have to be specially handled, but MJML is still young.
Installation
- Clone the repo
npm install
inside- Add your component inside
components
folder - Add your component route to
.mjmlconfig
(make sure to link the one in the /lib folder) - Use your own component in
index.mjml
(or uncomment themj-template-syntax
if you want to test the one already created) npm run build
to build, ornpm start
if you want to watch recompile on each file change- Result will be in
index.html
Attributes
No attributes are available for this plugin.