A summary of data about the Ruby ecosystem.

https://github.com/haml/haml

HTML Abstraction Markup Language - A Markup Haiku
https://github.com/haml/haml

Keywords from Contributors

activerecord activejob mvc rack rubygem sinatra rspec crash-reporting ruby-gem rubocop

Last synced: about 4 hours ago
JSON representation

Repository metadata

HTML Abstraction Markup Language - A Markup Haiku

README.md

Haml

Gem Version
test
Code Climate
Inline docs
Discord Server

Haml is a templating engine for HTML. It's designed to make it both easier and
more pleasant to write HTML documents, by eliminating redundancy, reflecting the
underlying structure that the document represents, and providing an elegant syntax
that's both powerful and easy to understand.

Basic Usage

Haml can be used from the command line or as part of a Ruby web framework. The
first step is to install the gem:

gem install haml

After you write some Haml, you can run

haml render document.haml

to compile it to HTML. For more information on these commands, check out

haml --help

To use Haml programmatically, check out the YARD documentation.

Using Haml with Rails

To use Haml with Rails, simply add Haml to your Gemfile and run bundle.

gem 'haml'

If you'd like to replace Rails's ERB-based generators with Haml, add
haml-rails to your Gemfile as well.

Formatting

The most basic element of Haml is a shorthand for creating HTML:

%tagname{:attr1 => 'value1', :attr2 => 'value2'} Contents

No end-tag is needed; Haml handles that automatically. If you prefer HTML-style
attributes, you can also use:

%tagname(attr1='value1' attr2='value2') Contents

Adding class and id attributes is even easier. Haml uses the same syntax as
the CSS that styles the document:

%tagname#id.class

In fact, when you're using the <div> tag, it becomes even easier. Because
<div> is such a common element, a tag without a name defaults to a div. So

#foo Hello!

becomes

<div id='foo'>Hello!</div>

Haml uses indentation to bring the individual elements to represent the HTML
structure. A tag's children are indented beneath than the parent tag. Again, a
closing tag is automatically added. For example:

%ul
  %li Salt
  %li Pepper

becomes:

<ul>
  <li>Salt</li>
  <li>Pepper</li>
</ul>

You can also put plain text as a child of an element:

%p
  Hello,
  World!

It's also possible to embed Ruby code into Haml documents. An equals sign, =,
will output the result of the code. A hyphen, -, will run the code but not
output the result. You can even use control statements like if and while:

%p
  Date/Time:
  - now = DateTime.now
  %strong= now
  - if now > DateTime.parse("December 31, 2006")
    = "Happy new " + "year!"

Haml provides far more tools than those presented here. Check out the reference
documentation

for full details.

Indentation

Haml's indentation can be made up of one or more tabs or spaces. However,
indentation must be consistent within a given document. Hard tabs and spaces
can't be mixed, and the same number of tabs or spaces must be used throughout.

Contributing

Contributions are welcomed, but before you get started please read the
guidelines.

After forking and then cloning the repo locally, install Bundler and then use it
to install the development gem dependencies:

gem install bundler
bundle install

Once this is complete, you should be able to run the test suite:

rake

At this point rake should run without error or warning and you are ready to
start working on your patch!

Note that you can also run just one test out of the test suite if you're working
on a specific area:

ruby -Itest test/helper_test.rb -n test_buffer_access

Haml currently supports Ruby 3.2.0 and higher, so please make sure your changes run on 3.2+.

Team

Current Maintainers

Alumni

Haml was created by Hampton Catlin, the author of
the original implementation. Hampton is no longer involved in day-to-day coding,
but still consults on language issues.

Natalie Weizenbaum was for many years the primary developer
and architect of the "modern" Ruby implementation of Haml.

Norman Clarke was the primary maintainer of Haml from 2012 to 2016.

License

Some of Natalie's work on Haml was supported by Unspace Interactive.

Beyond that, the implementation is licensed under the MIT License.

Copyright (c) 2006-2019 Hampton Catlin, Natalie Weizenbaum and the Haml team

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 5,799
Total Committers: 226
Avg Commits per committer: 25.659
Development Distribution Score (DDS): 0.514

Commits in past year: 35
Committers in past year: 11
Avg Commits per committer in past year: 3.182
Development Distribution Score (DDS) in past year: 0.457

Name Email Commits
Nathan Weizenbaum n****2@g****m 2816
Takashi Kokubun t****n@g****m 1305
Norman Clarke n****n@n****m 367
Akira Matsuda r****e@d****p 210
Takashi Kokubun t****n@c****m 191
Matt Wildig m****t@m****k 162
Chris Eppstein c****s@e****t 130
Tee Parham t****e@n****m 92
hcatlin h****n@7****9 77
Mislav Marohnić m****c@g****m 27
packagethief p****f@7****9 20
thedarkone t****2@g****m 17
Hampton Catlin h****n@g****m 17
tom t****m@7****9 15
Geremia Taglialatela t****a 10
Chris Heald c****d@g****m 10
Ali Ismayilov a****i@i****o 10
Robin Daugherty r****n@r****t 9
Hampton Catlin h****n@v****m 9
Nick Sutterer a****k@g****m 7
Dillon Welch d****8@g****m 6
Jon Allured j****d@g****m 6
Joshua Peek j****h@j****m 6
Koszta Peter Pal k****l@e****u 5
Aman Gupta a****n@t****t 5
Andre Arko a****e@a****t 4
Cristi Balan e****l@c****u 4
Jared Beck j****d@j****m 4
Jonathan del Strother me@d****m 4
Peter Goldstein p****n@g****m 4
and 196 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 18 days ago

Total issues: 103
Total pull requests: 66
Average time to close issues: 9 months
Average time to close pull requests: about 1 month
Total issue authors: 85
Total pull request authors: 29
Average comments per issue: 2.65
Average comments per pull request: 1.02
Merged pull request: 39
Bot issues: 0
Bot pull requests: 0

Past year issues: 6
Past year pull requests: 12
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 1 day
Past year issue authors: 6
Past year pull request authors: 7
Past year average comments per issue: 0.5
Past year average comments per pull request: 0.0
Past year merged pull request: 6
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/haml/haml

Top Issue Authors

  • HamptonMakes (8)
  • tagliala (6)
  • mildred (3)
  • abitrolly (2)
  • k0kubun (2)
  • timdiggins (2)
  • mockdeep (2)
  • jibees (1)
  • mishina2228 (1)
  • Frigory33 (1)
  • niklas-hasselmeyer (1)
  • maland (1)
  • AkshayGoyal022 (1)
  • minad (1)
  • mattwildig (1)

Top Pull Request Authors

  • tagliala (17)
  • k0kubun (8)
  • leo424y (4)
  • nhasselmeyer (4)
  • JasonnnW3000 (2)
  • mingan (2)
  • petergoldstein (2)
  • Frigory33 (2)
  • mattwildig (2)
  • snan (2)
  • amatsuda (2)
  • danieldiekmeier (2)
  • jdelStrother (1)
  • iazel (1)
  • risen (1)

Top Issue Labels

  • Help Wanted (4)
  • Bug (3)
  • Feature (3)
  • Feedback (1)

Top Pull Request Labels


Package metadata

gem.coop: haml

An elegant, structured (X)HTML/XML templating engine.

  • Homepage: https://haml.info
  • Documentation: http://www.rubydoc.info/gems/haml/
  • Licenses: MIT
  • Latest release: 7.2.0 (published 4 months ago)
  • Last Synced: 2026-04-28T23:28:07.629Z (2 days ago)
  • Versions: 208
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 195,510,593 Total
  • Docker Downloads: 467,256,993
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.088%
    • Downloads: 0.128%
    • Docker downloads count: 0.223%
  • Maintainers (5)
rubygems.org: haml

An elegant, structured (X)HTML/XML templating engine.

proxy.golang.org: github.com/haml/haml

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/haml/haml#section-documentation
  • Licenses: mit
  • Latest release: v7.2.0+incompatible (published 4 months ago)
  • Last Synced: 2026-04-28T23:28:09.286Z (2 days ago)
  • Versions: 42
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.497%
    • Average: 5.681%
    • Dependent repos count: 5.866%
gem.coop: haml-parser

Pladeholder for future haml-parser

  • Homepage: https://github.com/haml/haml
  • Documentation: http://www.rubydoc.info/gems/haml-parser/
  • Licenses: MIT
  • Latest release: 0.0.0 (published about 8 years ago)
  • Last Synced: 2026-04-25T17:03:57.988Z (5 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,731 Total
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 30.189%
    • Downloads: 90.568%
  • Maintainers (1)
rubygems.org: haml-parser

Pladeholder for future haml-parser

  • Homepage: https://github.com/haml/haml
  • Documentation: http://www.rubydoc.info/gems/haml-parser/
  • Licenses: MIT
  • Latest release: 0.0.0 (published about 8 years ago)
  • Last Synced: 2026-04-28T23:28:07.648Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,735 Total
  • Rankings:
    • Stargazers count: 0.293%
    • Forks count: 0.848%
    • Dependent packages count: 15.706%
    • Average: 31.479%
    • Dependent repos count: 46.782%
    • Downloads: 93.765%
  • Maintainers (1)

Dependencies

.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems
  • benchmark-ips = 2.3.0
  • maxitest >= 0
  • pandoc-ruby >= 0
  • pry >= 0
  • redcarpet >= 0
  • stackprof >= 0
haml.gemspec rubygems
  • benchmark_driver >= 0 development
  • bundler >= 0 development
  • coffee-script >= 0 development
  • erubi >= 0 development
  • haml >= 5 development
  • less >= 0 development
  • minitest-reporters ~> 1.1 development
  • rails >= 4.0 development
  • rake >= 0 development
  • rake-compiler >= 0 development
  • sass >= 0 development
  • slim >= 0 development
  • string_template >= 0 development
  • unindent >= 0 development
  • temple >= 0.8.2
  • thor >= 0
  • tilt >= 0

Score: 34.6836431630073