Skip to content

Instantly share code, notes, and snippets.

@ff6347
Forked from pgib/ext.rb
Created September 26, 2016 11:26
Show Gist options
  • Select an option

  • Save ff6347/956f9b931a1dd0765da10ea8189d8887 to your computer and use it in GitHub Desktop.

Select an option

Save ff6347/956f9b931a1dd0765da10ea8189d8887 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