我正在使用Scalatra的内置Scalate支持,但我想让我的default.scaml布局呈现HTML5 Doctype。 Scalate文档指出When the format option is set to :html5, !!! is always <!DOCTYPE html>,但我无法找到任何人说明如何设置格式选项。如何在Scalate for Scaml中指定HTML5 Doctype格式?
TIA!
我正在使用Scalatra的内置Scalate支持,但我想让我的default.scaml布局呈现HTML5 Doctype。 Scalate文档指出When the format option is set to :html5, !!! is always <!DOCTYPE html>,但我无法找到任何人说明如何设置格式选项。如何在Scalate for Scaml中指定HTML5 Doctype格式?
TIA!
他们应该让运营商像!!! 1 – ziggystar
感谢James,我读了XHTML5并跳过它。直到我重读它们使用相同的文档类型,我才意识到。 –
另外供参考,它看起来像是要将默认的!!!
声明更改为HTML5,您可以更改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
...
}
我只是看着在詹姆斯斯特拉坎在几乎任何情况下,建议在玉一Scaml视频。 –
在Jade GitHub页面的实现下,它列出了链接到Scaml的Scala。那么Scaml是Jade的Scala实现,还是有什么区别? – nilskp
我想他们只是把它连接错了。这里是Scalate/Jade链接: http://scalate.fusesource.org/documentation/jade.html – nilskp