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