سؤال

Is it possible to use Haml (or similar tempting languages like Scaml or Jade) in Play views?

هل كانت مفيدة؟

المحلول

Try using the Scalate, template engine.

نصائح أخرى

Well I am unsure if anyone had any luck on this. So let me share what I did.

I am using play 2.1.1 with scala. Integrating Play (Scala) with Jade is a pain.

If you are comfortable with haml, Jade is probably the closest to it.

The integration of play 2.* with jade isn't that great, especially if you are working with sbt. Installing scalate is a bit of an overkill as it is pretty heavy weight. I used a Java library called Jade4J which is written in Java.

You can see my solution here .. pretty clean and easy.

There are some plugins like play2-scalate which might help you but they get the whole scalate library which is not really required. Hope this helps. Cheers

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top