CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 22 Aug 2025 19:24:36 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090405165839
location: https://web.archive.org/web/20090405165839/https://github.com/nex3/haml/tree/0.1.0
server-timing: captures_list;dur=0.760132, exclusion.robots;dur=0.025554, exclusion.robots.policy;dur=0.011310, esindex;dur=0.015756, cdx.remote;dur=33.973275, LoadShardBlock;dur=173.926128, PetaboxLoader3.datanode;dur=48.578162, PetaboxLoader3.resolve;dur=93.861539
x-app-server: wwwb-app213
x-ts: 302
x-tr: 244
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app213; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Fri, 22 Aug 2025 19:24:38 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Sun, 05 Apr 2009 16:58:39 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 128ms
x-archive-orig-etag: "5270c85c783eb89415599a688c1e2d5e"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 27102
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 05 Apr 2009 16:58:39 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 22 Sep 2008 14:50:31 GMT", ; rel="prev memento"; datetime="Sun, 04 Jan 2009 15:41:39 GMT", ; rel="memento"; datetime="Sun, 05 Apr 2009 16:58:39 GMT", ; rel="next memento"; datetime="Fri, 16 Jul 2010 02:52:36 GMT", ; rel="last memento"; datetime="Fri, 16 Jul 2010 02:52:36 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_9_20090405080427_crawl102-c/51_9_20090405165837_crawl101.arc.gz
server-timing: captures_list;dur=1.217274, exclusion.robots;dur=0.054196, exclusion.robots.policy;dur=0.023715, esindex;dur=0.021568, cdx.remote;dur=115.900233, LoadShardBlock;dur=389.586175, PetaboxLoader3.datanode;dur=608.356496, PetaboxLoader3.resolve;dur=491.909886, load_resource;dur=764.237253
x-app-server: wwwb-app213
x-ts: 200
x-tr: 1342
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=2
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
nex3's haml at 0.1.0 - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Description: | HTML Abstraction Markup Language - A Markup Haiku |
Homepage: | https://haml.hamptoncatlin.com |
Clone URL: |
git://github.com/nex3/haml.git
Give this clone URL to anyone.
git clone git://github.com/nex3/haml.git
|

packagethief (author)
Thu Oct 05 08:22:42 -0700 2006
haml /
name | age | message | |
---|---|---|---|
![]() |
MIT-LICENSE | Loading commit data... ![]() |
|
![]() |
README | ||
![]() |
Rakefile | Thu Oct 05 08:18:35 -0700 2006 | Rolling back to the last stable commit before t... [packagethief] |
![]() |
init.rb | ||
![]() |
lib/ | ||
![]() |
test/ | Thu Oct 05 08:18:35 -0700 2006 | Rolling back to the last stable commit before t... [packagethief] |
= Haml (XHTML Abstraction Markup Language) HAML is a markup language that's used to cleanly and simply describe the XHTML of any web document without the use of inline code. Haml functions as a replacement for inline page templating systems such PHP, RHTML, and ASP. However, Haml avoids the need for explicitly coding XHTML into the template, because it iself is a description of the XHTML, with some code to generate dynamic content. == Features * Whitespace active * Well-formatted markup * DRY * Follows CSS conventions * Interpolates Ruby code * Implements Rails templates with the .haml extension == Authors HAML was originally created by Hampton Catlin (hcatlin). Help with the Ruby On Rails implementation and much of the documentation by Jeff Hardy (packagethief). If you use this software, you must pay Hampton a compliment. Say something nice about it. Beyond that, the implementation is licensed under the MIT License. Ok, fine, I guess that means compliments aren't *required*. == Formatting Haml is sensitive to spacing and indentation; it uses nesting to convey structure. When you want an element to have children, indent the lines below it using two spaces. Remember, spaces are not the same as tabs. Example: #contact %h1 Eugene Mumbai %ul.info %li.login eugene %li.email eugene@example.com is compiled to: <div id='contact'> <h1>Eugene Mumbai</h1> <ul class='info'> <li class='login'>eugene</li> <li class='email'>eugene@example.com</li> </ul> </div> == Characters with meaning to Haml Haml responds to certain special characters. To create an element in the form of <tt><element></element></tt> use the <tt>%</tt> character, immediately followed by the element name. To specify attributes, include a hash of attributes inside curly braces. Example: %one %meta{:content => 'something'}/ %two %three Hey there is compiled to: <one> <two> <meta content='something' /> <three>Hey there</three> </two> </one> Any string is a valid element name; Haml will automatically generate opening and closing tags for any element. When you want to force the output of a self-closing tag, use the forward slash character. Example: %br/ # => <br /> %meta{:http-equiv => 'Content-Type', :content => 'text/html'}/ # => <meta http-equiv='Content-Type' content='text/html' /> HTML div elements are assumed when no <tt>%tag</tt> is present and the line is preceeded by either the <tt>#</tt> or the <tt>.</tt> characters. This convention uses familiar CSS semantics: <tt>#</tt> denotes the id of the element, <tt>.</tt> denotes its class name. Example: #collection .item Broken record album is the same as: %div{:id => collection} %div{:class => 'item'} Broken record album and is comiled to: <div id='collection'> <div class='item'>Broken record album</div> </div> There is a shortcut when you want to specify either the id or class attributes of an element: follow the element name with either the <tt>#</tt> or the <tt>.</tt> characters. Example: #things %span#rice Chicken Fried %p.beans The magical fruit is compiled to: <div id='things'> <span id='rice'>Chicken Fried</span> <p class='beans'>The magical fruit</p> </div> === Specifying a document type When describing xhtml documents with Haml, you can have a document type generated automatically by including the characters <tt>!!!</tt> as the first line in your document. Example: !!! %html %head %title Myspace %body %h1 I am the international space station %p Sign my guestbook is compiled to: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Myspace</title> </head> <body> <h1>I am the international space station</h1> <p>Sign my guestbook</p> </body> </html> == Using Haml as a Rails plugin Write Rails templates with the .haml extension. Example: %html %head %title= "Teen Wolf (1985)" %body #contents %h1 "A highschooler discovers that he is a werewolf" %ul.cast %li "Scott Howard" %li "Rupert 'Stiles' Stilinski" %li "Lisa 'Boof' Marconi" %li "Lewis" is compiled to: <html> <head> <title>Teen Wolf (1985)</title> </head> <body> <div id='contents'> <h1>A highschooler discovers that he is a werewolf</h1> <ul class='cast'> <li>Scott Howard</li> <li>Rupert 'Stiles' Stilinski</li> <li>Lisa 'Boof' Marconi</li> <li>Lewis</li> </ul> </div> </body> </html> You can access instance variables in Haml templates the same way you do in ERb templates. Helper methods are also available in Haml templates. To specify that a line should be evaulated as Ruby, use the <tt>=</tt> character at the begining of a line, or immediately following an element name. The return value of the method call will be inserted into the stream. Example: file: app/controllers/movies_controller.rb class MoviesController < ApplicationController def index @title = "Teen Wolf" end end file: app/views/movies/index.haml #content .title %h1= @title = link_to 'Home', home_url is be compiled to: <div id='content'> <div class='title'> <h1>Teen Wolf</h1> <a href='/'>Home</a> </div> </div> --- Copyright (c) 2006 Hampton Catlin Licensed under the MIT License
This feature is coming soon. Sit tight!