Skip to content

Instantly share code, notes, and snippets.

@zoul
Last active May 17, 2018 15:21
Show Gist options
  • Save zoul/7579150 to your computer and use it in GitHub Desktop.
Save zoul/7579150 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”.
begin
require 'terminal-notifier'
module Jekyll
class Site
alias jekyll_process process
def process
jekyll_process
TerminalNotifier.notify('Jekyll rebuild finished.')
end
end
end
rescue LoadError
# nothing
end
@johnpitchko
Copy link

Hmm placed this file in my _plugins/ directory but does not seem to be generating any notifications. I installed terminal-notifier via home-brew.

@lukeemmerson-finch
Copy link

Hey, anyone know how to get this to work with Jekyll V3.8.1 and terminal notifier 2.0.0? They appear to have stopped speaking to one another. I can manually trigger terminal notifier, so i suspect it's this plugin code that needs updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment