Skip to content

MQuy/phoenix_mjml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix Template Engine for Mjml

License License

Powered by Mjml

Usage

  1. Add {:phoenix_mjml, "~> 0.2.1"} to your deps in mix.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"}
  2. Add the following to your Phoenix config/config.exs
 config :phoenix, :template_engines,
   mjml: PhoenixMjml.Engine
  1. Use the .html.mjml extensions 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)$}
      ]
    ]

License

MIT license. Please see LICENSE for details.

About

Phoenix Template Engine for Mjml

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages