Skip to content

Instantly share code, notes, and snippets.

@jbgo
Created June 19, 2012 15:28
Show Gist options
  • Save jbgo/2954801 to your computer and use it in GitHub Desktop.
Save jbgo/2954801 to your computer and use it in GitHub Desktop.
Render markdown READMEs on the fly

This is my new favorite thing to do when I want to read a README file written in markdown. This assumes you are macosx and have the redcarpet gem installed.

alias readme='redcarpet README.md > readme.html; open readme.html'
readme
@kellyredding
Copy link

@jbgo - nice. This got me thinking and I added to it - too far? :)

alias readme='test -x `which redcarpet` && test -f ./README.md && redcarpet README.md > ~/.Trash/readme.html && open ~/.Trash/readme.html'

@jbgo
Copy link
Author

jbgo commented Jun 20, 2012

@kellyredding I like it! Keeps the working directory clean.

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