aboutsummaryrefslogtreecommitdiff
path: root/.themes/classic/_plugins/haml.rb
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-06-29 14:01:06 -0400
committerBrandon Mathis <brandon@imathis.com>2011-06-29 14:01:06 -0400
commitea349cdfbfa4d42110099e49a8ff23f7213cd5b6 (patch)
treeaca4c6c7646207fe295197695b0cf87ee2a46913 /.themes/classic/_plugins/haml.rb
parentce6621724c8d13530681724528b22e1c381f0dc2 (diff)
downloadmy_new_personal_website-ea349cdfbfa4d42110099e49a8ff23f7213cd5b6.tar.xz
my_new_personal_website-ea349cdfbfa4d42110099e49a8ff23f7213cd5b6.zip
Moved themes to .themes to get it out of the way. Updated Rakefile to support .themes dir and remove duplication. Improved deploy task. Renamed init_deploy to cofig_deploy and rewrote it to update configurations in the Rakefile for easier deploy use
Diffstat (limited to '.themes/classic/_plugins/haml.rb')
-rw-r--r--.themes/classic/_plugins/haml.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/.themes/classic/_plugins/haml.rb b/.themes/classic/_plugins/haml.rb
new file mode 100644
index 00000000..7e548dec
--- /dev/null
+++ b/.themes/classic/_plugins/haml.rb
@@ -0,0 +1,24 @@
+module Jekyll
+ require 'haml'
+ class HamlConverter < Converter
+ safe true
+ priority :low
+
+ def matches(ext)
+ ext =~ /haml/i
+ end
+
+ def output_ext(ext)
+ ".html"
+ end
+
+ def convert(content)
+ begin
+ engine = Haml::Engine.new(content)
+ engine.render
+ rescue StandardError => e
+ puts "!!! HAML Error: " + e.message
+ end
+ end
+ end
+end