Skip to content

Instantly share code, notes, and snippets.

@mwhittaker
Created March 21, 2014 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwhittaker/9680634 to your computer and use it in GitHub Desktop.
Save mwhittaker/9680634 to your computer and use it in GitHub Desktop.
gitdown
#! /bin/sh
usage() {
echo "usage:"
echo " gitdown <markdown file>"
}
if test $# -lt 1; then
usage;
exit;
fi
echo '<head>'
echo ' <link rel="stylesheet" type="text/css" href="http://gist.githubusercontent.com/andyferra/2554919/raw/2e66cabdafe1c9a7f354aa2ebf5bc38265e638e5/github.css">'
echo '</head>'
markdown "$1"
@mwhittaker
Copy link
Author

This script is a wrapper to markdown that allows you to compile github-styled html from markdown files. For example, to compile and view foo.md:

gitdown foo.md > foo.html
firefox foo.html

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