What doctypes are available in Yesod Hamlet?
문제
In Hamlet, $doctype 5
generates <!DOCTYPE html>
. The Yesod book says that "We have support for a number of different versions of a doctype
", but does not document these. What other doctypes are supported and what is the syntax?
해결책
You can see the list in the source code:
https://github.com/yesodweb/shakespeare/blob/master/hamlet/Text/Hamlet/Parse.hs#L526
The theory behind this was that people were going to ask for all the additional doctypes that they needed, and once we had a comprehensive list, we'd put it in the docs. It seems that no one cared about anything but the HTML 5 doctype.
제휴하지 않습니다 StackOverflow