public
Last active

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
require 'growl'
 
module Jekyll
class GrowlPreHook < Hook
safe false
sequence :pre
def run(site)
Growl.notify 'Building...', :title => 'Jekyll'
end
end
class GrowlPostHook < Hook
safe false
sequence :post
def run(site)
Growl.notify 'Build complete', :title => 'Jekyll'
end
end
end

We'd like to take advantage of Jekyll's new plugin architecture instead of maintaining a fork. Unfortunately, it's not possible to have growl notifications behave in the same way without monkey patching generator plugins.

I've pushed an experimental branch which adds pre-hook, in-hook and post-hook plugin support while preserving compatibility with existing Generators. It's mostly proof of concept, but I think it's a step in the right direction if it can be merged upstream.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.