Significant Whitespace
Haml and Slim templates are significant whitespace languages. This means that the indentation of the content is important. EGO templates use normal HTML structure inside the template body.
Content that needs to be nested within an element is indented under that element.
Indentation
Indentation is used to indicate the structure of the content. The indentation creates the parent-child relationship of the elements.
GoHT Haml and Slim template content must be indented with at least one tab.
renders as:
First line
The first line in a template must start at column one. After the first line, the indentation size and character are determined by the first significant whitespace before any content.
Tabs only
GoHT aligns with the gofmt tool coding style and uses tabs for Haml and Slim indentation.
Nesting
You may only indent children one level below their parent. You may unindent as many levels as you need.
In the above, each new indent was only one level deeper than the previous.
The .header and .content are children of .main.
We return from several indents to put the .footer at the same level as .main.