From 17c59fb1d1bf3e0c05137af4b4bd09ae271a2d31 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Tue, 19 Jul 2011 09:06:54 -0400 Subject: 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. --- plugins/haml.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 plugins/haml.rb (limited to 'plugins/haml.rb') 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 -- cgit v1.2.1