开发者

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

开发者 https://www.devze.com 2023-03-14 03:07 出处:网络
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,

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

精彩评论

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