Phoenix Template Engine for Mjml
Powered by Mjml
Usage
Add
{:phoenix_mjml, "~> 0.1.0"}to your deps inmix.exs. If you generated your app from the Phoenix master branch, add phoenix_mjml's master branch to your deps instead.{:phoenix_mjml, github: "chrismccord/phoenix_mjml"}Add the following to your Phoenix
config/config.exsconfig :phoenix, :template_engines, mjml: PhoenixMjml.EngineUse the
.html.mjmlextensions for your templates.
Optional
Add mjml extension to Phoenix live reload in config/dev.exs
config :hello_phoenix, HelloPhoenix.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{web/views/.*(ex)$},
~r{web/templates/.*(eex|mjml)$}
]
]