diff --git a/Readme.md b/Readme.md index 006d9f30..2fae845c 100644 --- a/Readme.md +++ b/Readme.md @@ -61,16 +61,16 @@ File issues for EJS v2 here: https://github.com/mde/ejs/issues ## Includes - Includes are relative to the template with the `include` statement, + Includes are relative to the template with the `include()` function, for example if you have "./views/users.ejs" and "./views/user/show.ejs" - you would use `<% include user/show %>`. The included file(s) are literally + you would use `<%- include("user/show") %>`. The included file(s) are literally included into the template, _no_ IO is performed after compilation, thus local variables are available to these included templates. ``` ``` @@ -160,10 +160,10 @@ ejs.filters.last = function(obj) { simply including a header and footer like so: ```html -<% include head %> +<%- include("head") %>

Title

My page

-<% include foot %> +<%- include("foot") %> ``` ## client-side support