soasme / nim-mustache

Mustache in Nim
https://mustache.github.io/
MIT License
64 stars 6 forks source link

Explicitly specify partial loaders #6

Closed soasme closed 3 years ago

soasme commented 3 years ago

Issue I want to have different types of loaders, and am able to organize the order of these loaders. Each loader provides a way to resolve templates.

Example

ctx = newContext()
ctx.searchDir("./")
ctx.searchTable(table)

Or in another order

ctx = newContext()
ctx.searchTable(table1)
ctx.searchDir("./")
ctx.searchTable(table2)
soasme commented 3 years ago

Feature implemented, see changelog v0.3.0.

pietroppeter commented 3 years ago

great, thanks, will use it very soon in my own nimib (which also uses your other great library for markdown)! I also appreciate the fact that the default order created by newContext is first searchDirs and then in memory partials!

pietroppeter commented 3 years ago

I added a small note to the code here