Fix error in example for included templates (#122)

When using templates from an environment, `inja::env::render`
must be used.

Closes #121
This commit is contained in:
Tom
2019-11-09 13:41:32 +01:00
committed by pantor
parent e7d5c5332d
commit 1b2212cc69

View File

@@ -168,7 +168,7 @@ render("{% include \"footer.html\" %}", data);
// To include in-memory templates, add them to the environment first
inja::Template content_template = env.parse("Hello {{ neighbour }}!");
env.include_template("content", content_template);
render("Content: {% include \"content\" %}", data); // "Content: Hello Peter!"
env.render("Content: {% include \"content\" %}", data); // "Content: Hello Peter!"
```
### Functions