diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-07-19 09:06:54 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-07-19 09:06:54 -0400 |
commit | 17c59fb1d1bf3e0c05137af4b4bd09ae271a2d31 (patch) | |
tree | a4b3b5d43173f9b02ec4b6401cb6e14f6e716a35 /plugins/haml.rb | |
parent | 873a604e144c53cfc5465a790e43db5b7ebb429e (diff) | |
download | my_new_personal_website-17c59fb1d1bf3e0c05137af4b4bd09ae271a2d31.tar.xz my_new_personal_website-17c59fb1d1bf3e0c05137af4b4bd09ae271a2d31.zip |
Moved plugins to root directory. I'm ditching the idea of shipping plugins with themes until it's more obviously necessary. This way it's easier to merge and update plugins.
Diffstat (limited to 'plugins/haml.rb')
-rw-r--r-- | plugins/haml.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/haml.rb b/plugins/haml.rb new file mode 100644 index 00000000..7e548dec --- /dev/null +++ b/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 |