Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are the Jinja email templates rendered #141

Closed
stratosgear opened this issue Apr 10, 2020 · 3 comments
Closed

How are the Jinja email templates rendered #141

stratosgear opened this issue Apr 10, 2020 · 3 comments

Comments

@stratosgear
Copy link

I see a /backend/app/app/email-tempaltes/src folder and a /backend/app/app/email-tempaltes/build folder which means that the email templates are somehow rendered/compiled.

Without becoming a Jinja expert (if at all possible), where is the magic happening here and how can I create my own templates...?

@michaeloliverx
Copy link

The email templates are using MJML. You can create your own at mjml.io/try-it-live

If you want the modify the existing ones you can copy the contents of the template in the src directory into the browser, make the modifications then click view HTML on the top right to see the generated HTML.

I think @tiangolo included both the template and the generated HTML so we could easily modify them.

@stratosgear
Copy link
Author

Ooops, sorry! I thought .mjml were some raw Jinja templates that needed rendering.

I guess a note in that raw .mjml folder of what these files are would be helpful.

Thanks, closing this.

@tiangolo
Copy link
Member

Thanks for the help @michael0liver !

Also, if you use VS Code, you can try this extension: https://marketplace.visualstudio.com/items?itemName=attilabuti.vscode-mjml

I wish there was a way to build MJML in Python instead of having to commit the built files, but 🤷 ...that's what we have for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants