mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
1. Moved _plugins into themes/classic/_plugins
I think it's probably better to ship plugins with themes to make it easier to update them. 2. Improved 'install' rake task and made nicer output
This commit is contained in:
24
themes/classic/_plugins/haml.rb
Normal file
24
themes/classic/_plugins/haml.rb
Normal file
@ -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
|
||||
Reference in New Issue
Block a user