From 1c11b5ab2838a59b865b9ecededc844b4b851ce3 Mon Sep 17 00:00:00 2001 From: Alex Koutmos Date: Fri, 15 Apr 2022 15:44:27 -0400 Subject: [PATCH] Updating readme --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cad4455..ab9a1d1 100644 --- a/README.md +++ b/README.md @@ -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 + + + + + + Hello MJML EEx! + + + + +``` With those in place, you should be all set to go!