Recommendation about templating engine library

Andrea ilmanzo at gmail.com
Mon Mar 11 16:10:24 UTC 2024


On Monday, 11 March 2024 at 15:50:28 UTC, bachmeier wrote:
>
> I found mustache-d easy enough and good enough for my needs. I 
> haven't used it with a recent compiler, but it's hard to see 
> how it would need much maintenance.

just trying it out and kinda fits my needs; the main issues are 
lack of documentation and the need to explicit loop on array data 
structures in the code (using sub-contexts) instead of having a 
"foreach" loop statement in the template itself; at the end the 
template turns out to be cleaner but you need to write some code 
to feed it the proper way.

On other fancier templating engines, It's handy to have a 
`{{%foreach item ; list}}` keyword and iterate on `{{item}}`.

this is what I came up as a quick hack: 
https://gist.github.com/ilmanzo/3163cad4e2246f2553f1a90735e79e6b


More information about the Digitalmars-d-learn mailing list