Fast extensible html5 builder written in pure Ruby. Replaces templating engines without loosing speed bringing back the power of OOP.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bench
lib
rails_bench
spec
.gitignore
.rspec
.rvmrc
.simplecov
.travis.yml
.yardopts
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE.txt
README.md
README_FULL.md
VERSION
htmless.gemspec
update_doc.rb

README.md

Htmless

Build Status

Fast and extensible HTML5 builder written in pure Ruby, replaces templating engines without losing speed bringing back the power of OOP.

Quick syntax example

Htmless::Formatted.new.go_in do
  html5
  html do
    head { title 'my_page' }
    body do
      div id: 'content' do
        p "my page's content", class: centered
      end
    end
  end
end.to_html

returns

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>my_page</title>
  </head>
  <body>
    <div id="content">
      <p class="centered">my page's content</p>
    </div>
  </body>
</html>