WordPress Plugin For Showing GitHub Code

Posted by Matt on Wed, Oct 29 2008

I wrote a quick plugin for WordPress that pull code from GitHub for showing in a blog post. I figured that it would be a pain to go back to old posts and update code any time I committed a change, so this should do it automatically.

Usage

Simply paste link into the post and change "http" to "httpc". Adding the "c" lets the plugin know you want the link replaced with the actual code. This way you can still post links that won't get replaced. Code is cached in WordPress for 24 hours, so you may not see changes instantly.

Code

Here's the plugin (and it's also an example of the plugin in action):

httpc://github.com/mcurry/wordpress_github/raw/master/github.php
Posted in GitHub

1 Comment

Add new comment