git - Display Github repository files directly in a blog -
i have blog , i'd add code snippets in of posts.
i found "gist" thing pretty handy looks works code directly paste in. i'm familiar syntax highlighter , similar tools still doesn't cover requirement.
i'd find useful tool allow display github repository files directly within blog. imagine giving gist url of repository file , pasting source gist provides post.
is there way link files in public github repository can display them in blog code snippet?
you can using tool called gist-it.
usage
take github file url , prefix http://gist-it.appspot.com , embed result within tag:
<script src="http://gist-it.appspot.com/http://github.com/$file"></script>$file should follow github repository pattern of $user/$repository/raw/master/$path github/$file shorthand http://github.com/$file , works in same way
here's test made following guidelines.
works!

Comments
Post a Comment