Quick Notes
- Haml is usually indented with two spaces, although more than two is allowed. You have to be consistent, though.
- The first character of any line is called the "control character" - it says "make a tag" or "run Ruby code" or all sorts of things.
- Haml takes care of nicely indenting your HTML.
- Haml allows Ruby code and blocks. But not in this example. We turned it off for security.
You can get more information by reading the
Official Haml Reference
This example doesn't allow Ruby to be executed, but real Haml does.
Ruby code is included by using = at the beginning of a line.
Read the tutorial for more information.