Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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”.
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
@kerim

This comment has been minimized.

Copy link

commented Dec 3, 2016

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?

@johnpitchko

This comment has been minimized.

Copy link

commented Jun 23, 2017

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
You can’t perform that action at this time.