jekyll-haml 0.0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ ## 0.1.1 2012-12-04
2
+ ### minor enhancements
3
+ * Fix issue where layout was not parsing yaml front matter. - ([@simonreed][])
data/README.md CHANGED
@@ -1,24 +1,50 @@
1
1
  # Jekyll::Haml
2
2
 
3
- TODO: Write a gem description
3
+ This gem provides a [Jekyll](http://github.com/mojombo/jekyll) converter for
4
+ [Haml](http://haml.info) files.
4
5
 
5
6
  ## Installation
6
7
 
7
- Add this line to your application's Gemfile:
8
+ If using [Bundler](http://gembundler.com), add this line to your application's Gemfile:
8
9
 
9
10
  gem 'jekyll-haml'
10
11
 
11
- And then execute:
12
+ In a file within your Jekyll project's `_plugins` directory:
12
13
 
13
- $ bundle
14
+ # _plugins/bundler.rb
15
+ require "rubygems"
16
+ require "bundler/setup"
17
+ Bundler.require(:default)
14
18
 
15
- Or install it yourself as:
19
+ ## Usage
16
20
 
17
- $ gem install jekyll-haml
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!
18
22
 
19
- ## Usage
23
+ For clean content blocks, I find it helps to use Haml's `:markdown` filter if I can get away with it.
24
+
25
+ ```haml
26
+ ---
27
+ title: Story Time
28
+ permalink: page/
29
+ ---
30
+ :javascript
31
+ $(document).ready(function(){});
32
+
33
+ %h3= "{% title %}"
34
+ .content
35
+ :markdown
36
+ *Dec 4, 2012* - [Author](http://github.com)
37
+
38
+ Once upon a time, in a village by the sea...
39
+
40
+ = "{% haml comments.haml %}"
41
+ ```
42
+
43
+ ## About
44
+
45
+ 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).
20
46
 
21
- TODO: Write usage instructions here
47
+ If you're using this stuff, you may also be interested in [Octopress](http://octopress.org). I believe it includes support for Haml/Sass out of the gate.
22
48
 
23
49
  ## Contributing
24
50
 
@@ -4,13 +4,16 @@
4
4
 
5
5
  module Jekyll
6
6
  class Layout
7
- def content
8
- if ext == '.haml' && @converted != true
9
- @content = ::Haml::Engine.new(@content).render
10
- @converted = true
11
- else
12
- @content
13
- end
7
+ def initialize(site, base, name)
8
+ @site = site
9
+ @base = base
10
+ @name = name
11
+
12
+ self.data = {}
13
+
14
+ self.process(name)
15
+ self.read_yaml(base, name)
16
+ self.transform
14
17
  end
15
18
  end
16
19
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Haml
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-13 00:00:00.000000000 Z
12
+ date: 2013-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -51,6 +51,7 @@ extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
53
  - .gitignore
54
+ - CHANGELOG.md
54
55
  - Gemfile
55
56
  - LICENSE.txt
56
57
  - README.md
@@ -80,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
81
  version: '0'
81
82
  requirements: []
82
83
  rubyforge_project:
83
- rubygems_version: 1.8.24
84
+ rubygems_version: 1.8.25
84
85
  signing_key:
85
86
  specification_version: 3
86
87
  summary: Convert HAML files to standard HTML files as part of your Jekyll build.