Skip to content

Commit 9bc3f60

Browse files
committed
README: break apart examples
1 parent 1f62b5e commit 9bc3f60

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
@@ -18,28 +18,46 @@ In a file within your Jekyll project's `_plugins` directory:
1818

1919
## Usage
2020

21-
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!
22-
23-
For clean content blocks, I find it helps to use Haml's `:markdown` filter if I can get away with it.
21+
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!
2422

2523
```haml
2624
---
2725
title: Story Time
2826
permalink: page/
2927
---
28+
.container
29+
%h3= "{% title %}"
30+
3031
:javascript
3132
$(document).ready(function(){});
33+
```
3234

33-
%h3= "{% title %}"
35+
### Markdown blocks
36+
37+
For clean content blocks, I find it helps to use Haml's `:markdown` filter if I can get away with it.
38+
39+
```haml
3440
.content
3541
:markdown
3642
*Dec 4, 2012* - [Author](http://github.com)
3743
3844
Once upon a time, in a village by the sea...
45+
```
46+
47+
### Partials
48+
49+
The gem adds the liquid filter `haml` so you can render `_includes` that are written in Haml as well.
3950

40-
= "{% haml comments.haml %}"
51+
```liquid
52+
{% haml comments.haml %}
4153
```
4254

55+
```haml
56+
-# _includes/meta.haml
57+
%meta{property: 'og:type', content: 'website'}
58+
%meta{name: 'viewport', content: 'width=device-width'}
59+
```
60+
4361
## About
4462

4563
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)