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
...
}
精彩评论