我正在使用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