Skip to content

Commit

Permalink
Merge branch 'fixImports'
Browse files Browse the repository at this point in the history
  • Loading branch information
David Krause (enthus1ast) committed Aug 12, 2024
2 parents 8cfb53e + 50cb262 commit b69fafe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```
Expand All @@ -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
Expand Down

0 comments on commit b69fafe

Please sign in to comment.