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.')
end
end
end
rescue LoadError
# nothing
end
@chriddyp

This comment has been minimized.

Copy link

commented Aug 14, 2015

Amazing! Does this work for the regenerating watcher, jekyll serve?

@chriddyp

This comment has been minimized.

Copy link

commented Aug 14, 2015

It does indeed! Fantastic! Thank you!
image

For folks discovering this on google, add this plugin to your project by saving it inside your _plugins folder.

@nimf

This comment has been minimized.

Copy link

commented Jan 23, 2016

Thank you!
I've updated this gist to report build errors also: https://gist.github.com/nimf/8637eb8ba68f9134014b

@johnpitchko

This comment has been minimized.

Copy link

commented Jun 23, 2017

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

This comment has been minimized.

Copy link

commented May 17, 2018

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