Permalink
Browse files

Documentation and example update for ejs include directive

  • Loading branch information...
1 parent 6055829 commit 4207a79ea81d643f8e4b7cbce72ee1d082bc0f62 @nicjansma nicjansma committed Dec 3, 2012
View
@@ -1,8 +1,11 @@
-# node-email-templates <sup>0.0.6</sup>
+# node-email-templates <sup>0.0.7</sup>
Node.js module for rendering beautiful emails with [ejs][1] templates and email-friendly inline CSS using [juice][2].
+**v0.0.7**:
+* Added support for ejs's `include` directive thanks to @nicjansma
+
**v0.0.6**:
* Fixed batch problem (`...has no method slice`) thanks to @vekexasia
@@ -52,7 +55,8 @@ npm install email-templates-windows
* `html.ejs` - html + [ejs][1] version of your email template (**required**)
* `text.ejs` - text + [ejs][1] version of your email template (**optional**)
* `style.css` - stylesheet for the template, which will render `html.ejs` with inline CSS (**optional**)
-5. Utilize one of the examples below for your respective email module and start sending beautiful emails!
+5. You may use the `include` directive from ejs (for example, to include a common header or footer). See the `/examples` folder for details.
+6. Utilize one of the examples below for your respective email module and start sending beautiful emails!
# EJS Custom Tags
@@ -366,6 +370,7 @@ emailTemplates(templatesDir, function(err, template) {
* Nick Baugh <niftylettuce@gmail.com>
* Andrea Baccega <vekexasia@gmail.com>
+* Nic Jansma (http://nicj.net)
## License
@@ -0,0 +1,2 @@
+ </body>
+</html>
@@ -0,0 +1 @@
+
@@ -0,0 +1,2 @@
+<html>
+ <body>
@@ -0,0 +1 @@
+
@@ -1,5 +1,3 @@
-<html>
- <body>
+<% include ../header/html %>
<h1>Hi there <%= name.first %> <%= name.last %></h1>
- </body>
-</html>
+<% include ../footer/html %>
@@ -1 +1,3 @@
+<% include ../header/text %>
Hi there <%= name.first %> <%= name.last %>.
+<% include ../footer/text %>
@@ -1,7 +1,5 @@
-<html>
- <body>
+<% include ../header/html %>
<h1>You are invited to our weekly pasta dinner!</h1>
<h2>This week's pasta is: <%= pasta %></h2>
<h3>We hope to see you there!</h3>
- </body>
-</body>
+<% include ../footer/html %>
@@ -1,5 +1,7 @@
+<% include ../header/text %>
You are invited to join our weekly pasta dinner!
This week's pasta is: <%= pasta %>
We hope to see you there!
+<% include ../footer/text %>
View
@@ -1,11 +1,12 @@
{
"name": "email-templates"
, "description": "Node.js module for rendering beautiful emails with ejs templates and email-friendly inline CSS using juice."
- , "version": "0.0.6"
+ , "version": "0.0.7"
, "author": "Nick Baugh <niftylettuce@gmail.com>"
, "contributors": [
{ "name": "Nick Baugh", "email": "niftylettuce@gmail.com" }
, { "name": "Andrea Baccega", "email": "vekexasia@gmail.com" }
+ , { "name": "Nic Jansma", "web": "http://nicj.net" }
]
, "keywords": [ "node-email-templates", "ejs", "email", "templates", "email-templates", "juice", "inline", "css" ]
, "homepage": "https://github.com/niftylettuce/node-email-templates"

0 comments on commit 4207a79

Please sign in to comment.