Skip to content

Instantly share code, notes, and snippets.

@adamkovesdi
Last active November 25, 2017 19:13
Show Gist options
  • Save adamkovesdi/8cb8616960f73bf0567cb0df42c07ad6 to your computer and use it in GitHub Desktop.
Save adamkovesdi/8cb8616960f73bf0567cb0df42c07ad6 to your computer and use it in GitHub Desktop.
Automatic markdown preview using Guard and grip

Automatic markdown preview creation using Guard and grip

This is how to set up a Guard script to automatically render markdown previews github style using grip.

Prerequisites

Installation

gem install guard
gem install guard-shell
sudo pip install grip

Example Guardfile

For README.md

# vim: ai ts=2 sts=2 et sw=2 ft=ruby
# vim: autoindent tabstop=2 shiftwidth=2 expandtab softtabstop=2 filetype=ruby

guard :shell do
  watch(/README.md/) do |m|
    `grip --export`
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment