Last active
December 14, 2015 09:28
-
-
Save stengland/5065013 to your computer and use it in GitHub Desktop.
Render and open markdown
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
| #!/bin/sh | |
| TFILE=`tempfile -s .html` | |
| echo '<link href="https://gist.github.com/stengland/5065514/raw/markdown.css" rel="stylesheet" type="text/css" />' >> $TFILE | |
| marked $1 >> $TFILE && | |
| xdg-open $TFILE |
Author
@stengland This looks very handy! Have you seen GitHub's markdown API? It would remove the node dependency, but I guess it adds a network dependency.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uses https://github.com/chjj/marked for Git Hub flavoured markdown