Closed ntalbott closed 12 years ago
I did more research on this, and it turns out what's odd isn't that the export has the XHTML doctype, but rather that serve is giving HTML5. Long story short, you need:
!!! 5
If you want haml to spit out an HTML5 DOCTYPE. I'm going to keep this open to track fixing the issue of serve giving an HTML5 when it should be giving an XHTML, but hopefully this resolves your issue.
Hmmm, just realized this is in the context of haml default options. Looking at that now...
On my iPhone so please forgive errors.
I believe the '!!! 5' will only output an HTML5 doctype, not output all elements in the HTML5 format.
Yup, I think you're right. Working on a proper fix now.
OK, I ended up just adding a proper way to configure templating engines in d2c17a25:
Serve::FileTypeHandler.configure(:haml, :format => :html5)
I recommend putting this in a view_helpers.rb
file rather than in config.ru
, since if you do the latter it won't get applied when exporting. Let me know if it works for you - thanks!
Awesome! You rock. I'll check it out tomorrow morning. Thanks so much.
Jake
Sent from my iPhone
On Apr 12, 2012, at 7:20 PM, Nathaniel Talbottreply@reply.github.com wrote:
OK, I ended up just adding a proper way to configure templating engines in d2c17a25:
Serve::FileTypeHandler.configure(:haml, :format => :html5)
I recommend putting this in a
view_helpers.rb
file rather than inconfig.ru
, since if you do the latter it won't get applied when exporting. Let me know if it works for you - thanks!
Reply to this email directly or view it on GitHub: https://github.com/jlong/serve/issues/73#issuecomment-5107305
Tried out your fix and it works great. Thanks again.
@JakeCarter in #22:
Also: