Skip to content

Instantly share code, notes, and snippets.

@pgib
Created March 11, 2014 15:39
Show Gist options
  • Select an option

  • Save pgib/9488344 to your computer and use it in GitHub Desktop.

Select an option

Save pgib/9488344 to your computer and use it in GitHub Desktop.
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