Skip to content

Instantly share code, notes, and snippets.

@pgib pgib/ext.rb

Created Mar 11, 2014
Embed
What would you like to do?
Optional Jekyll monkey patch to use terminal-notifier to signal a Jekyll build completion. Put in _plugins/ext.rb
require 'jekyll-assets'
# optional notification for jekyll build completion
#
# gem install terminal-notifier
# rbenv rehash
#
module Jekyll
class Site
alias old_write write
def write
old_write
if `uname`.strip == "Darwin"
`terminal-notifier -title "#{config['title'] ? config['title'] : 'Jekyll Site'}" -message "Jekyll generate complete."`
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.