HAML, aka HTML Abstraction Markup Language, is an open source template language created in 2006 by Hampton Lintorn-Catlin.
#77on PLDB | 18Years Old | 323Repos |
git clone https://github.com/haml/haml
Haml (HTML Abstraction Markup Language) is a templating system that is designed to avoid writing inline code in a web document and make the HTML easy and clean. Haml gives the flexibility to have some dynamic content in HTML. Similar to other web languages like PHP, ASP, JSP and template systems like eRuby, Haml also embeds some code that gets executed during runtime and generates HTML code in order to provide some dynamic content. Read more on Wikipedia...
%section.container
%h1= post.title
%h2= post.subtitle
.content
= post.content
%html
%title Hello World
%body
%h1 Hello World
%p
Hello,
World!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>BoBlog</title>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<link href="/stylesheets/main.css" media="screen" rel="Stylesheet" type="text/css" />
</head>
<body>
<div id='header'>
<h1>BoBlog</h1>
<h2>Bob's Blog</h2>
</div>
<div id='content'>
<div class='entry'>
<h3 class='title'>Halloween</h3>
<p class='date'>Tuesday, October 31, 2006</p>
<p class='body'>
Happy Halloween, glorious readers! I'm going to a party this evening... I'm very excited.
</p>
</div>
<div class='entry'>
<h3 class='title'>New Rails Templating Engine</h3>
<p class='date'>Friday, August 11, 2006</p>
<p class='body'>
There's a very cool new Templating Engine out for Ruby on Rails. It's called Haml.
</p>
</div>
</div>
<div id='footer'>
<p>
All content copyright © Bob
</p>
</div>
</body>
</html>
Feature | Supported | Example | Token |
---|---|---|---|
Comments | ✓ | -# A comment | |
Line Comments | ✓ | -# A comment | -# |
Semantic Indentation | ✓ | ||
Disk Output | X |