Created
March 11, 2014 15:39
-
-
Save pgib/9488344 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
This file contains hidden or 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
| 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