3 ms·
We have many https://nimble.directory/search?query=template https://nimble.directory/search?query=template Also karax can also work as on server side, no virtu
by planetis 5y ago
We have many https://nimble.directory/search?query=template https://nimble.directory/search?query=template
Also karax can also work as on server side, no virtual dom in that scenario. People prefer it because of type checking over string templates.
- mrweasel 5y agoI think I tried most of those templating options, but some seems to have been abandoned, many try to abstract the html away and most are incomplete. Nwt seemed like the most promising, but it don’t even allow loops in your template.
- planetis 5y agoI really don't understand what your requirements are. Again karax is well known and better alternative than all these (i.e loops and other control flow work as expected).
- mrweasel 5y agoUnderstandably, I don't think I explained it all that well. If I look at the Karax example, it seems more like a way of building the HTML in Nim, but I want to write HTML. If you look at Jinja2, then it's HTML, but with a bit of embedded syntax to do loops, conditionals and string replacement, plus a few handy functions. The built in templates in Go is a bit simplistic, but it's enough for my needs. So something like it would be nice. As you pointed out the Karax it has type safety, which my suggestions doesn't have. It's also not required, because HTML/text templates doesn't need type safety, it's all just text. Basically I want nwt, with loops and control statements implemented.
- planetis 5y agoThis might do it https://nim-lang.github.io/Nim/filters.html https://nim-lang.github.io/Nim/filters.html