Slm template engine/language

Working with ruby on rails I’ve come to love the slim templating language.
http://slim-lang.com/

There has been a port of that to javascript called slm:

I have been able to use this with Enonic XP instead of thymeleaf, but it’s a bit slower. Say 200 times.

Perhaps someone at Enonic has better knowledge about where to hook the slm template engine into Enonic, so it can run faster. I just ran it as part of a parts controller code.

When working on a layout I stripped away everything but the component paths from the regions, which works fine when mode != ‘edit’, but fails in content studio component view. In another task I tried manipulating the component name and type on both layout and page level, which did nothing. So it seems to me Enonic XP is doing something fancy behind the scenes. That thymeleaf and Enonic XP is hooked together somehow. That things are not like rails engines which are sort of “blackboxes” in a chain. What if I wanted to run some engine before or after thymeleaf, etc…

Please discuss around this topic.

Hi.

I have no knowledge of slim, but any templating language should be possible to integrate. Thymeleaf is just a library as anything else, so could slim.

Not sure what you did, but it’s true that Javascript in JVM is a bit slower. 200 times sounds a bit too much, but the implementation may not be optimized. How are you initializing the slim engine? Outside of your controller or inside each controller function handlers?

If you have some usage examples, then please post it here.

BR,
Sten Roger