Quick Notes
- Text::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.
- Text::Haml takes care of nicely indenting your HTML.
- Text::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 Text::Haml Reference
This example doesn't allow Ruby to be executed, but real Text::Haml does.
Ruby code is included by using = at the beginning of a line.
Read the tutorial for more information.