Created
August 10, 2010 16:34
-
-
Save dtjm/517556 to your computer and use it in GitHub Desktop.
Revisions
-
dtjm revised this gist
Aug 10, 2010 . 2 changed files with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # _plugins/haml_converter.rb module Jekyll class HamlConverter < Converter safe true This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ --- --- <!-- _layouts/home.haml --> %html %head %title= page.title -
dtjm created this gist
Aug 10, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ module Jekyll class HamlConverter < Converter safe true def setup return if @setup require 'haml' @setup = true rescue STDERR.puts 'do `gem install haml`' raise FatalException.new("Missing dependency: haml") end def matches(ext) ext =~ /haml/i end def output_ext(ext) ".html" end def convert(content) setup engine = Haml::Engine.new(content) engine.render end end end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ --- layout: home title: Home Page --- %h1 Hello World? This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ --- --- %html %head %title= page.title %body #container #header HEADER #content = content #footer FOOTER