Haml

Haml
ParadigmTemplate engine
Designed byHampton Catlin
DevelopersNatalie Weizenbaum (past), Norman Clarke, Matt Wildig, Akira Matsuda, Tee Parham[1]
Stable release
6.3.0[2] Edit this on Wikidata / 10 December 2023; 9 months ago (10 December 2023)
Implementation languageRuby
OSCross-platform
LicenseMIT License and Unspace Interactive[1]
Filename extensions.haml
Websitehaml.info

Haml (HTML Abstraction Markup Language) is a templating system that is designed to avoid writing inline code in a web document and make the HTML cleaner. Similar to other template systems like eRuby, Haml also embeds some code that gets executed during runtime and generates HTML code in order to provide some dynamic content. In order to run Haml code, files need to have a .haml extension. These files are similar to .erb or .eRuby files, which also help embed Ruby code while developing a web application.

While parsing code comments, Haml uses the same rules as Ruby 1.9 or later. Haml understands only ASCII-compatible encodings, like UTF-8, but not UTF-16, or UTF-32, because these are not compatible with ASCII.[3][4]

Haml can be used at the command line, as a separate Ruby module, or in a Ruby on Rails application.

  1. ^ a b Cite error: The named reference github was invoked but never defined (see the help page).
  2. ^ "Release 6.3.0". 10 December 2023. Retrieved 19 December 2023.
  3. ^ "Encoding". Retrieved 29 January 2016.
  4. ^ "UTF encodings". GitHub. Retrieved 7 February 2016.