开发者

How do I specify an HTML5 Doctype format in Scalate for Scaml?

I'm using Scalatra's built-in Scalate support but I want my default.scaml 开发者_开发问答layout to render an HTML5 Doctype. The Scalate documentation states When the format option is set to :html5, !!! is always <!DOCTYPE html> but I can't find anyone saying exactly how to set the format option.

TIA!


Try

!!! 5

See the user guide for more detail.


Also for reference, it looks like if you want to change the default !!! declaration to HTML5, you can change the ScamlOptions.format var. Seems there are other helpful options in there also.

import org.fusesource.scalate.scaml.ScamlOptions

class MyScalatraFilter extends ScalatraFilter with ScalateSupport {
    ScamlOptions.format = ScamlOptions.Format.html5
    ...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜