Skip to content

Commit 261f7dc

Browse files
committed
Merge pull request #15 from rstacruz/patch-1
README: break apart examples
2 parents 2cb85e3 + 9bc3f60 commit 261f7dc

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,46 @@ gems:
2222
2323
## Usage
2424
25-
You'll be able to use all of Haml's tricks to write some really clean markup. You can use liquid filters easily by just rendering the liquid tags as shown below. The gem adds the liquid filter `haml` so you can render `_includes` that are written in Haml as well. Have fun!
26-
27-
For clean content blocks, I find it helps to use Haml's `:markdown` filter if I can get away with it.
25+
You'll be able to use all of Haml's tricks to write some really clean markup. You can use liquid filters easily by just rendering the liquid tags as shown below. Have fun!
2826
2927
```haml
3028
---
3129
title: Story Time
3230
permalink: page/
3331
---
32+
.container
33+
%h3= "{% title %}"
34+
3435
:javascript
3536
$(document).ready(function(){});
37+
```
3638

37-
%h3= "{% title %}"
39+
### Markdown blocks
40+
41+
For clean content blocks, I find it helps to use Haml's `:markdown` filter if I can get away with it.
42+
43+
```haml
3844
.content
3945
:markdown
4046
*Dec 4, 2012* - [Author](http://github.com)
4147
4248
Once upon a time, in a village by the sea...
49+
```
50+
51+
### Partials
52+
53+
The gem adds the liquid filter `haml` so you can render `_includes` that are written in Haml as well.
4354

44-
= "{% haml comments.haml %}"
55+
```liquid
56+
{% haml comments.haml %}
4557
```
4658

59+
```haml
60+
-# _includes/meta.haml
61+
%meta{property: 'og:type', content: 'website'}
62+
%meta{name: 'viewport', content: 'width=device-width'}
63+
```
64+
4765
## About
4866

4967
I originally searched around the internet for a quick way to integrate HAML into my jekyll workflow and found a few around the internet to convert haml in different cases (layouts, partials, and posts). This gem is really just a collection of those techniques so they're easy to find and you can get back to creating your site using the slickest markup. It's made to drop in to your `Gemfile` just as easily as [jekyll-sass](https://github.com/noct/jekyll-sass).

0 commit comments

Comments
 (0)