From 50cb262107caf26037fd9f1481ab71b64438d134 Mon Sep 17 00:00:00 2001 From: "David Krause (enthus1ast)" Date: Mon, 12 Aug 2024 08:39:47 +0200 Subject: [PATCH] Signed-off-by: David Krause (enthus1ast) --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ad9a7d2..50c6e6e 100644 --- a/readme.md +++ b/readme.md @@ -284,7 +284,7 @@ compileTemplateStr ```nim proc myRenderProc(someParam: string): string = - compileTemplateStr("some nimja code {{someParam}}") + compileTemplateStr("some nimja code {{someParam}}", baseDir = getScriptDir()) echo myRenderProc("test123") ``` @@ -297,6 +297,8 @@ iteratior section. assign calls to a variable. The default is `result`. If you want it to use another variable set it in `varname` +`baseDir` is needed when you want to import/extend templates! + A context can be supplied to the `compileTemplateString` (also `compileTemplateFile`), to override variable names: ```nim