Instant Haml [Instant]
|Print & eBook also available on:|
- Learn something new in an Instant! A short, fast, focused guide delivering immediate results
- Step-by-step instructions that will help you integrate Haml into your current application setup and development workflow
- Learn how to speed up development of view templates
- Understand Haml options, configuration and Rails-specific features
Book DetailsLanguage : English
eBook : 52 pages
Release Date : September 2013
ISBN : 1783283777
ISBN 13 : 9781783283774
Author(s) : Krzysztof Niksiński
Topics and Technologies : All Books, Instant, Open Source
Table of ContentsInstant Haml
- Instant Haml
- So, what is Haml?
- Step 1 – what do I need?
- Step 2 – downloading and installing Haml
- Step 3 – converting an Haml file to an HTML file using the command line Haml utility to verify that it works
- And that's it
- Quick start – using Haml
- Step 1 – integrating with Rails and creating a simple view file
- Step 2 – switching Rails application to use Haml as the templating engine
- Step 3 – converting existing view templates to Haml
- Step 4 – using attributes
- Step 5 – integrating Haml with your current programming editor
- Sublime Text 2
- Step 6 – Haml and Twitter Bootstrap framework
- Top 6 features you'll want to know about
- Using HTML tags and attributes
- Creating basic tags
- Inserting HTML attributes
- Using Boolean attributes
- Inserting HTML5 data attributes
- Appending class and ID names
- Self-closing tags
- Using object references in class and ID names
- Generating doctypes
- Adding comments to the markup
- Using HTML comments
- Using Haml/Ruby comments
- Evaluating Ruby code
- Inserting Ruby code
- Running Ruby code
- Using Ruby interpolation
- Using filters
- Creating a custom filter
- Creating multiline attributes, Ruby code, and strings
- Ruby code
- Using helpers and the ActionView extensions
- Changing Haml options
- Using HAML outside of Rails
- The tools for standalone HAML development
- Streamline static site development with Middleman
- People and places you should get to know
- Official sites
- Articles and tutorials
- About Packt Publishing
- Writing for Packt
Download the code and support files for this book.
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Sorry, there are currently no downloads available for this title.
What you will learn from this book
- Download and install Haml
- Integrate Haml with your Rails application
- Convert all existing view templates automatically
- Add Haml to your development editor
- Use Haml with Twitter Bootstrap Framework
Haml is a markup language used to rapidly develop Rails view templates (or HTML pages). It is used by professional developers and praised for its cleanliness, human friendliness and usage agility. It functions as a replacement for inline page templating systems such as PHP, ASP, and ERB - the templating language used in most Ruby on Rails applications. Haml is itself a description of HTML and hence it avoids the need for explicitly coding HTML into the template with some code to generate dynamic content.
A practical guide which shows you a number of examples of Haml usage and then lets you dive into more advanced features to help you take full advantage of rapid development of view templates in your Rails applications. This book will show you how you can use Haml to create beautiful, easily maintainable and concise view templates without the hassle of writing in HTML.
Starting by showing you how to install Haml and how to integrate it into your Rails application, this practical guide will then teach you how to create the elements of a view template. This book will introduce you to the important features of Haml, show you how to integrate Haml with your development editor, and how to make it work with the Twitter Bootstrap framework.
This book will also show you how to convert existing view templates. With this book, you will be able to integrate Haml into your current application setup and development workflow.
Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. A fast-paced, example-based guide to teach you how to integrate Haml into your Rails application.
Who this book is for
If you are a developer who would like to speed up and simplify your view template creation, this book is ideal for you. A basic working knowledge of HTML and CSS, as well as some Ruby on Rails experience is recommended.