SlideShare ist ein Scribd-Unternehmen logo
1 von 20
HAML For The Win! An introduction to HAML Oct. 13, 2011 1 Created for Magma Rails 2011 - www.magmarails.com Slides posted at http://tinyurl.com/magma-haml-sass Sample code from this presentation can be found in the following sample app: https://github.com/jonathandean/SASS-and-HAML-FTW
What is HAML? A more concise syntax for coding HTML in your Rails app Uses indentation for nesting markup Reduces code (no closing tags) Fixes the messy markup problem that often clutters views Uses a CSS-like syntax that is easier to read and compare to your style rules Makes coding your View layer faster Note: doesn’t affect render time or client-side performance, simply reduces coding efforts and makes the developer more efficient Easy to learn! Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 2
Using HAML in Rails Use it as a replacement for ERB files If you use Bundler, add this to your Gemfile: gem "haml” Files named filename.html.haml (instead of filename.html.erb) will be interpreted by HAML instead of ERB Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 3
A comparison HTML <body>   <div id=“wrapper”>     <div class=“stuff”>      <a href=“#”>Top</a>     </div>  </div> </body> HAML %body  #wrapper     .stuff       %a{:href => “#”} Top Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 4 7 lines 78 characters 4 lines 36 characters Note: Some examples compile using different formatting, I changed them for the slides for readability
Tag names Use % and then the name of the tag Examples: Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 5 HTML <body></body> <div></div> HAML %body %div
ID’s ID’s are just like they are in CSS #id_name Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 6 HTML <div id=“mine”></div> <p id=“yours”></p> HAML %div#mine %p#yours
Classes Classes are also just like they are in CSS .class_name Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 7 HTML <div class=“mine”></div> <p class=“yours”></p> HAML %div.mine %p.yours One way for multiple classes (more later) HTML <div class=“mine yours”></div> HAML %div.mine.yours
div is the default tag name If you want to leave out the tag name and just put classes and/or ID’s, %div is assumed Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 8 HTML <div id=“mine”></div> HAML %div#mine (or just) #mine
ID’s and Classes together Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 9 You can put ID’s and classes together as well HTML <div class=“yours” id=“mine”> </div> <div class=“yours his”id=“mine”> </div> HAML #mine.yours #mine.yours.his
Nesting Tags are nested by indentation only No closing tags! Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 10 HAML #mine  %p.yours hi! HTML <div id=“mine”> <p class=“yours”>hi!</p> </div>
Text content Text can go at the end of the line if there’s no other content to nest Can also be nested itself (required with other nested content) Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 11 HAML #mine  %p.yours hi! (or) #mine %p.yours    hi! #mine %p.yours    hi!    %span dude HTML <div id=“mine”>   <p class=“yours”>hi!</p> </div> <div id=“mine”>   <p class=“yours”>  hi! <span>dude</span>   </p> </div> #mine   %p.yourshi!     %span dude
Attributes Use a Ruby style hash for attributes Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 12 HTML <a href=“http://hi.com”>hi</a> <input type=“submit”> HAML %a{:href => ”http://hi.com”} hi %input{:type => "submit”} Or a more HTML-like syntax with () HAML %a(href=”http://hi.com”) hi %input(type="submit”) HTML <a href=“http://hi.com”>hi</a> <input type=“submit”>
Boolean Attributes Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 13 Use boolean values for attributes such as “selected” HTML <input selected> <input> HAML %input{:selected => true} (or) %input(selected=true) (or) %input(selected) %input{:selected => false} (or) %input(selected=false)
Using an array for ID’s and Classes For the ID attribute it will separate the values by an _ For the Class attribute it will add them as separate classes Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 14 HTML <p class=“one two”>hi</p> <p id=“one_two”>hi</p> HAML %p{:class => [‘one’,’two’]} hi %p{:id=> [‘one’,’two’]} hi
HTML?? You can also use regular HTML Converting a file over time Copy/paste a tracking code or something complicated and hard to write as HAML Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 15 HTML <div id=“myParagraph”>   <p>Hello there!</p> </div> HAML #myParagraph   <p>Hello there!</p>
Adding Ruby code Use – and = for Ruby code = for when you want to output the result – for when the code has no output Use of this should be rare, as this type of Ruby code shouldn’t often be in the view layer Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 16 HTML <p>hi hi hi hi hi</p> <p>hi</p> <p>hi</p> <p>hi</p> <p>hi</p> <p>hi</p> HAML %p= “hi “*5 ,[object Object],%p= “hi” No end required
Ruby Interpolation Use #{} to interpolate Ruby code Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 17 HTML <p>Hi Jon</p> HAML - awesome_guy = “Jon” %p Hi #{awesome_guy} (same as) ,[object Object],%p= “Hi #{awesome_guy}”
Filters Filters start with a : and let you put in indented content to be interpreted in a special way :javascriptfilter wraps some JavaScript in <script> and CDATA tags for inline JavaScript Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 18 HTML <script> //<![CDATA[ alert(‘Hello there!’); //]]> </script> HAML :javascript  alert(‘Hello there!’);
Filters :cssfilter wraps some CSS in <style> and CDATA tags for inline CSS Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 19 HTML <style> /*<![CDATA[*/ .mine{     color: red;   } /*]]>*/ </style> HAML :css  .mine{    color: red;  }
Other filters :plain – does not parse the content :escaped – same as plain but HTML-escapes the text :ruby – pass the content to the normal Ruby interpreter :sass – parse the content with SASS to produce CSS output and more! (see the docs) You can also make custom filters if you have special needs Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 20

Weitere ähnliche Inhalte

Was ist angesagt?

Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
guestbd1cdca
 
LESS is More
LESS is MoreLESS is More
LESS is More
jsmith92
 

Was ist angesagt? (19)

The Skinny on Slim
The Skinny on SlimThe Skinny on Slim
The Skinny on Slim
 
05 RD PoSD Tutorial_xhtml_to_html5_2016
05 RD PoSD Tutorial_xhtml_to_html5_201605 RD PoSD Tutorial_xhtml_to_html5_2016
05 RD PoSD Tutorial_xhtml_to_html5_2016
 
-Haml Presentation
-Haml Presentation-Haml Presentation
-Haml Presentation
 
Html in a box
Html in a boxHtml in a box
Html in a box
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
HTML all tags .........its to much helpful for beginners
HTML all tags .........its to much helpful for beginners HTML all tags .........its to much helpful for beginners
HTML all tags .........its to much helpful for beginners
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
HTML 5 Simple Tutorial Part 3
HTML 5 Simple Tutorial Part 3HTML 5 Simple Tutorial Part 3
HTML 5 Simple Tutorial Part 3
 
9. lower in Symfony 4
9. lower in Symfony 49. lower in Symfony 4
9. lower in Symfony 4
 
JavaScript - Part-1
JavaScript - Part-1JavaScript - Part-1
JavaScript - Part-1
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
Haml & sass
Haml & sassHaml & sass
Haml & sass
 
Changing Template Engine
Changing Template EngineChanging Template Engine
Changing Template Engine
 
LESS is More
LESS is MoreLESS is More
LESS is More
 
Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With Blogging
 
Html 101
Html 101Html 101
Html 101
 

Ähnlich wie Introduction to HAML

Ähnlich wie Introduction to HAML (20)

Xhtml Css Presentation
Xhtml Css PresentationXhtml Css Presentation
Xhtml Css Presentation
 
XHTML/CSS Presentation
XHTML/CSS PresentationXHTML/CSS Presentation
XHTML/CSS Presentation
 
XHTML/CSS Presentation
XHTML/CSS PresentationXHTML/CSS Presentation
XHTML/CSS Presentation
 
Diva
DivaDiva
Diva
 
Html1
Html1Html1
Html1
 
Html
HtmlHtml
Html
 
Learning HTML
Learning HTMLLearning HTML
Learning HTML
 
Introduction To Xml
Introduction To XmlIntroduction To Xml
Introduction To Xml
 
Web designing using html
Web designing using htmlWeb designing using html
Web designing using html
 
Xml Zoe
Xml ZoeXml Zoe
Xml Zoe
 
Xml Zoe
Xml ZoeXml Zoe
Xml Zoe
 
1.1 xhtml basics
1.1 xhtml basics1.1 xhtml basics
1.1 xhtml basics
 
Html
HtmlHtml
Html
 
Introduction to Web Design
Introduction to Web DesignIntroduction to Web Design
Introduction to Web Design
 
Html guide
Html guideHtml guide
Html guide
 
Class2
Class2Class2
Class2
 
Html For Beginners 2
Html For Beginners 2Html For Beginners 2
Html For Beginners 2
 
Block2 Session2 Presentation
Block2 Session2 PresentationBlock2 Session2 Presentation
Block2 Session2 Presentation
 
Lecture1 B Frames&Forms
Lecture1 B  Frames&FormsLecture1 B  Frames&Forms
Lecture1 B Frames&Forms
 
AK html
AK  htmlAK  html
AK html
 

Kürzlich hochgeladen

Pakistani Call girls in Deira 0567006274 Deira Call girls
Pakistani Call girls in Deira 0567006274 Deira Call girlsPakistani Call girls in Deira 0567006274 Deira Call girls
Pakistani Call girls in Deira 0567006274 Deira Call girls
Monica Sydney
 
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service HaridwarHaridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
ranekokila
 
Dubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in DubaiDubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in Dubai
Monica Sydney
 
Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123
Escorts in Lahore 03068178123
 

Kürzlich hochgeladen (20)

Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...
Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...
Vip Call Girls Bhubaneswar 🐱‍🏍 9777949614 Independent Escorts Service Bhubane...
 
Top IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdf
Top IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdfTop IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdf
Top IPTV Subscription Service to Stream Your Favorite Shows in 2024.pdf
 
Pakistani Call girls in Deira 0567006274 Deira Call girls
Pakistani Call girls in Deira 0567006274 Deira Call girlsPakistani Call girls in Deira 0567006274 Deira Call girls
Pakistani Call girls in Deira 0567006274 Deira Call girls
 
Foreigner Call Girls Mahim WhatsApp +91-9833363713, Full Night Service
Foreigner Call Girls Mahim WhatsApp +91-9833363713, Full Night ServiceForeigner Call Girls Mahim WhatsApp +91-9833363713, Full Night Service
Foreigner Call Girls Mahim WhatsApp +91-9833363713, Full Night Service
 
Jann Mardenborough's Better Half in Racing and Life
Jann Mardenborough's Better Half in Racing and LifeJann Mardenborough's Better Half in Racing and Life
Jann Mardenborough's Better Half in Racing and Life
 
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service HaridwarHaridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
 
Call Girls in Nizampet / 8250092165 Genuine Call girls with real Photos and N...
Call Girls in Nizampet / 8250092165 Genuine Call girls with real Photos and N...Call Girls in Nizampet / 8250092165 Genuine Call girls with real Photos and N...
Call Girls in Nizampet / 8250092165 Genuine Call girls with real Photos and N...
 
Call girls Service Bellary - 9332606886 Rs 3000 Free Pickup & Drop Services 2...
Call girls Service Bellary - 9332606886 Rs 3000 Free Pickup & Drop Services 2...Call girls Service Bellary - 9332606886 Rs 3000 Free Pickup & Drop Services 2...
Call girls Service Bellary - 9332606886 Rs 3000 Free Pickup & Drop Services 2...
 
Satara call girl 8617370543♥️ call girls in satara escort service
Satara call girl 8617370543♥️ call girls in satara escort serviceSatara call girl 8617370543♥️ call girls in satara escort service
Satara call girl 8617370543♥️ call girls in satara escort service
 
Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...
Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...
Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...
 
Codes and conventions of film magazines.pptx
Codes and conventions of film magazines.pptxCodes and conventions of film magazines.pptx
Codes and conventions of film magazines.pptx
 
Call 8617370543 Sangli Call girls with real photos and phone numbers
Call 8617370543 Sangli Call girls with real photos and phone numbersCall 8617370543 Sangli Call girls with real photos and phone numbers
Call 8617370543 Sangli Call girls with real photos and phone numbers
 
Pakistani Call girls in Ajman 0505086370 Ajman Call girls
Pakistani Call girls in Ajman 0505086370 Ajman Call girlsPakistani Call girls in Ajman 0505086370 Ajman Call girls
Pakistani Call girls in Ajman 0505086370 Ajman Call girls
 
Dubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in DubaiDubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in Dubai
 
Deira Call girls 0507330913 Call girls in Deira
Deira Call girls 0507330913 Call girls in DeiraDeira Call girls 0507330913 Call girls in Deira
Deira Call girls 0507330913 Call girls in Deira
 
Bhubaneswar🌹Patia ❤CALL GIRLS 9777949614 💟 CALL GIRLS IN bhubaneswar ESCORT S...
Bhubaneswar🌹Patia ❤CALL GIRLS 9777949614 💟 CALL GIRLS IN bhubaneswar ESCORT S...Bhubaneswar🌹Patia ❤CALL GIRLS 9777949614 💟 CALL GIRLS IN bhubaneswar ESCORT S...
Bhubaneswar🌹Patia ❤CALL GIRLS 9777949614 💟 CALL GIRLS IN bhubaneswar ESCORT S...
 
Call Girls Moradabad Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Moradabad Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Moradabad Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Moradabad Just Call 8617370543 Top Class Call Girl Service Available
 
Call Girls Bhubaneswar 9777949614 call me Independent Escort Service Bhubaneswar
Call Girls Bhubaneswar 9777949614 call me Independent Escort Service BhubaneswarCall Girls Bhubaneswar 9777949614 call me Independent Escort Service Bhubaneswar
Call Girls Bhubaneswar 9777949614 call me Independent Escort Service Bhubaneswar
 
Thane Female Escorts-✔9833754194-Kalyan Reasonalble Escorts-Kurla Independent...
Thane Female Escorts-✔9833754194-Kalyan Reasonalble Escorts-Kurla Independent...Thane Female Escorts-✔9833754194-Kalyan Reasonalble Escorts-Kurla Independent...
Thane Female Escorts-✔9833754194-Kalyan Reasonalble Escorts-Kurla Independent...
 
Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123Vip Models Escorts in Lahore 03068178123
Vip Models Escorts in Lahore 03068178123
 

Introduction to HAML

  • 1. HAML For The Win! An introduction to HAML Oct. 13, 2011 1 Created for Magma Rails 2011 - www.magmarails.com Slides posted at http://tinyurl.com/magma-haml-sass Sample code from this presentation can be found in the following sample app: https://github.com/jonathandean/SASS-and-HAML-FTW
  • 2. What is HAML? A more concise syntax for coding HTML in your Rails app Uses indentation for nesting markup Reduces code (no closing tags) Fixes the messy markup problem that often clutters views Uses a CSS-like syntax that is easier to read and compare to your style rules Makes coding your View layer faster Note: doesn’t affect render time or client-side performance, simply reduces coding efforts and makes the developer more efficient Easy to learn! Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 2
  • 3. Using HAML in Rails Use it as a replacement for ERB files If you use Bundler, add this to your Gemfile: gem "haml” Files named filename.html.haml (instead of filename.html.erb) will be interpreted by HAML instead of ERB Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 3
  • 4. A comparison HTML <body> <div id=“wrapper”> <div class=“stuff”> <a href=“#”>Top</a> </div> </div> </body> HAML %body #wrapper .stuff %a{:href => “#”} Top Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 4 7 lines 78 characters 4 lines 36 characters Note: Some examples compile using different formatting, I changed them for the slides for readability
  • 5. Tag names Use % and then the name of the tag Examples: Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 5 HTML <body></body> <div></div> HAML %body %div
  • 6. ID’s ID’s are just like they are in CSS #id_name Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 6 HTML <div id=“mine”></div> <p id=“yours”></p> HAML %div#mine %p#yours
  • 7. Classes Classes are also just like they are in CSS .class_name Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 7 HTML <div class=“mine”></div> <p class=“yours”></p> HAML %div.mine %p.yours One way for multiple classes (more later) HTML <div class=“mine yours”></div> HAML %div.mine.yours
  • 8. div is the default tag name If you want to leave out the tag name and just put classes and/or ID’s, %div is assumed Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 8 HTML <div id=“mine”></div> HAML %div#mine (or just) #mine
  • 9. ID’s and Classes together Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 9 You can put ID’s and classes together as well HTML <div class=“yours” id=“mine”> </div> <div class=“yours his”id=“mine”> </div> HAML #mine.yours #mine.yours.his
  • 10. Nesting Tags are nested by indentation only No closing tags! Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 10 HAML #mine %p.yours hi! HTML <div id=“mine”> <p class=“yours”>hi!</p> </div>
  • 11. Text content Text can go at the end of the line if there’s no other content to nest Can also be nested itself (required with other nested content) Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 11 HAML #mine %p.yours hi! (or) #mine %p.yours hi! #mine %p.yours hi! %span dude HTML <div id=“mine”> <p class=“yours”>hi!</p> </div> <div id=“mine”> <p class=“yours”> hi! <span>dude</span> </p> </div> #mine %p.yourshi! %span dude
  • 12. Attributes Use a Ruby style hash for attributes Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 12 HTML <a href=“http://hi.com”>hi</a> <input type=“submit”> HAML %a{:href => ”http://hi.com”} hi %input{:type => "submit”} Or a more HTML-like syntax with () HAML %a(href=”http://hi.com”) hi %input(type="submit”) HTML <a href=“http://hi.com”>hi</a> <input type=“submit”>
  • 13. Boolean Attributes Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 13 Use boolean values for attributes such as “selected” HTML <input selected> <input> HAML %input{:selected => true} (or) %input(selected=true) (or) %input(selected) %input{:selected => false} (or) %input(selected=false)
  • 14. Using an array for ID’s and Classes For the ID attribute it will separate the values by an _ For the Class attribute it will add them as separate classes Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 14 HTML <p class=“one two”>hi</p> <p id=“one_two”>hi</p> HAML %p{:class => [‘one’,’two’]} hi %p{:id=> [‘one’,’two’]} hi
  • 15. HTML?? You can also use regular HTML Converting a file over time Copy/paste a tracking code or something complicated and hard to write as HAML Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 15 HTML <div id=“myParagraph”> <p>Hello there!</p> </div> HAML #myParagraph <p>Hello there!</p>
  • 16.
  • 17.
  • 18. Filters Filters start with a : and let you put in indented content to be interpreted in a special way :javascriptfilter wraps some JavaScript in <script> and CDATA tags for inline JavaScript Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 18 HTML <script> //<![CDATA[ alert(‘Hello there!’); //]]> </script> HAML :javascript alert(‘Hello there!’);
  • 19. Filters :cssfilter wraps some CSS in <style> and CDATA tags for inline CSS Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 19 HTML <style> /*<![CDATA[*/ .mine{ color: red; } /*]]>*/ </style> HAML :css .mine{ color: red; }
  • 20. Other filters :plain – does not parse the content :escaped – same as plain but HTML-escapes the text :ruby – pass the content to the normal Ruby interpreter :sass – parse the content with SASS to produce CSS output and more! (see the docs) You can also make custom filters if you have special needs Oct. 13, 2011 An Introduction to HAML by Jonathan Dean - www.jonathandean.com 20