```
ERB
```erb
```
More detailed syntax may be covered in [the tests](https://github.com/amatsuda/himl/blob/master/test/himl_test.rb).
## Document Validations
Himl's strongest advantage is not that you just can reduce the template LOC, but the engine validates the structure of the document and detects some syntax errors.
For example, Himl raises `SyntaxError` while parsing these templates.
Mismatched closing tag
```erb
hello?
```
Mismatched ERB `end` expression
```erb
<% if @current_user.admin? %>
TOP SECRET
<% end %>
```
Extra ERB `end` expression
```erb
<% @books.each do |book| %>
<% book.read %>
<% end %>
<% end %>
```
## Example
Following is a comparison of ERB, Haml, and Himl templates that renders similar HTML results (the Haml example is taken from the [Haml documentation](http://haml.info/)).
You'll notice that Himl consumes the same LOC with the Haml version for expressing the structure of this document, without introducing any new syntax from the ERB version.
### ERB Template
```erb
<%= post.title %>
<%= post.subtitle %>
<%= post.content %>
```
### Haml Template
```haml
%section.container
%h1= post.title
%h2= post.subtitle
.content
= post.content
```
### Himl Template
```erb
<%= post.title %>
<%= post.subtitle %>
<%= post.content %>
```
## Installation
Bundle 'himl' gem to your project.
## Usage
The gem contains the Himl template handler for Rails.
You need no extra configurations for your Rails app to render `*.himl` templates.
## Runtime Performance
Since every Himl template is converted to ERB, then cached as a Ruby method inside the view frameworks (such as Action View in Rails), Himl runtime performance in production is exactly the same with that of ERB.
## Contributing
Pull requests are welcome on GitHub at https://github.com/amatsuda/himl.
## Other Template Engines That I Maintain
### [jb](https://github.com/amatsuda/jb)
A faster and simpler and stronger alternative to Jbuilder.
### [string_template](https://github.com/amatsuda/string_template)
The ultimate fastest template engine for Rails in the world.
### [Haml](https://github.com/haml/haml)
The one that you may be currently using everyday.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).