Skip to content

Commit

Permalink
Updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
akoutmos committed Apr 15, 2022
1 parent 404ffd8 commit 1c11b5a
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,30 @@ Checkout my [GitHub Sponsorship page](https://github.com/sponsors/akoutmos) if y

## Setting Up MJML EEx

After adding `{:mjml_eex, "~> 0.1.0"}` in your `mix.exs` file and running `mix deps.get`
Add `{:mjml_eex, "~> 0.1.0"}` to your `mix.exs` file and run `mix deps.get`. After you have that in place, you
can go ahead and create a template module like so:

```elixir
defmodule BasicTemplate do
use MjmlEEx, mjml_template: "basic_template.mjml.eex"
end
```

And the accompanying MJML EEx template `basic_template.mjml.eex` (note that the path is relative to the calling
module path):

```html
<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-divider border-color="#F45E43"></mj-divider>
<mj-text font-size="20px" color="#F45E43">Hello MJML EEx!</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
```

With those in place, you should be all set to go!

Expand Down

0 comments on commit 1c11b5a

Please sign in to comment.