Skip to content

Instantly share code, notes, and snippets.

@tatey
Created August 15, 2010 08:49
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tatey/525267 to your computer and use it in GitHub Desktop.
Save tatey/525267 to your computer and use it in GitHub Desktop.
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
@tatey
Copy link
Author

tatey commented Aug 15, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment