Introducing Our New Templating Engine
Fish last edited by
Are there any current themes written in benchpress which we can poke around at?
@fish the syntax hasn't changed, so actually all of the existing themes are benchpress compatible...
arutemu last edited by arutemu
Well, for me NodeBB works great. I run it on a micro instance and resource consumption is very low. There were some minor issues, but overall I'm very happy with it. I just don't use plugins which are unsupported, i think this is a common sense when deploying open source code developed by community. I think it could be useful (and it will help to avoid a lot of confusion) if we put plugins into different categories: stable (always tested with every new release of NodeBB), and unstable (use at your own risk), this model works well for Debian Linux, that has three branches: Stable, Testing and Unstable (sid).
@arutemu Thanks for the feedback, we're always looking to establish new release practices.
We have stable branches, namely the release branches (e.g.
developare both considered development branches.
razr.world last edited by
@razr-world twig is not compatible with templates.js syntax.
Also, it's tough claiming to be faster than Benchpressjs. I haven't seen any benchmarks comparing the two.
@pitaj Didn't you run your own benchmarks against comparable templating engines? I'd love to see those results posted...
@razr-world I don't see anywhere that makes these claims, but they both compile to JS, so the performance should be similar.
I'd like to see actual benchmarks as well.
There you go, published results. It looks like Twig.js is even slower than templates.js was, and much slower than Benchpress. I am a little dubious of those results, though, as I could have easily messed something up in the benchmark.
There's one more breaking change that I did not find documented anywhere.
For our theme we had to change:
var templates = require('templates.js'); templates.registerHelper('generateCategoryBorder', helpers.generateCategoryBorder);
var Benchpress = require('benchpressjs'); Benchpress.registerHelper('generateCategoryBorder', helpers.generateCategoryBorder);
Not a big deal but some folks might struggle to see why their template helpers don't work on server side.