Haml Lab
Haml is an abstract way to build your XHTML documents. It currently is only implemented in Ruby. It is used mostly in conjunction with the Ruby on Rails framework and its ActionView library.
Haml is extremely dense and is almost like a haiku for your structural elements. Don't be wary of being confused at first. This is normal. Once you start looking at it closer, you will start to see the beauty in it.
Also it is worth noting that Haml can indeed interpret Ruby commands and variables. However, in this Lab, the functionality is turned off for security purposes.
Quick Notes
- Haml is indented with two spaces *only*
- The first character of any line is called the "control character"
- Haml magically takes care of indention for you
- It looks complicated until you look closely.
- Haml does have blocks. Except, not in this example. We turned them off for security.
- If you see any errors here, please let me know
This example doesn't allow ruby to be executed, but real Haml does in Rails.
This would be done with an = at the end or beginning of a line.
Read the documentation for more information