Convert existing html.erb to Haml

http://www.htmltohaml.com

A more user-friendly alternative to the selected answer.


You can use from the command line html2haml

html2haml your_erb_file new_haml_file

If you want to convert all your files in one go, look at this article : http://shifteleven.com/articles/2008/06/08/converting-erb-to-haml-snippet


There you go: http://html2haml.heroku.com/

EDIT: Moved to https://html2haml.herokuapp.com/


David Leung provides this gem on github that installs two rake tasks.

With erb2haml, you can easily convert an entire project from erb to haml with either rake haml:convert_erbs or rake haml:replace_erbs.