-
-
Save nimf/8637eb8ba68f9134014b to your computer and use it in GitHub Desktop.
Posts a message to the OS X notification center when a Jekyll build is finished. Requires TerminalNotifier, see http://git.io/5X99Eg or “gem install terminal-notifier”.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'terminal-notifier' | |
module Jekyll | |
class Site | |
alias jekyll_process process | |
def process | |
jekyll_process | |
TerminalNotifier.notify("🍻 Jekyll rebuild finished") | |
rescue => e | |
TerminalNotifier.notify("💥 Jekyll rebuild failed: #{e.message}") | |
raise e | |
end | |
end | |
end | |
rescue LoadError | |
# nothing | |
end |
Supposedly you install it in the _plugins/
directory, but I cannot get it to work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please forgive a newbie question, but what do I do with the file build-notifier.rb? I understand that I need to install the gem terminal-notifier, but I'm not sure how to use the code you have here with that?