I’ve been looking for a solution to code posting on wordpress. I think I’ve found it in the form of Gist, Embed Github Gist, and a jquery addon I just put together called hoverslide.
The Gist embed option prints out something like this:
<div id="gist-1378474" class="gist">
<div class="gist-file">
<div class="gist-data gist-syntax">
<div class="gist-highlight">
<pre><div class="line" id="LC1"><span class="k">print</span> <span class="s">"hello world"</span></div></pre>
</div>
</div>
<div class="gist-meta">
<a href="https://gist.github.com/raw/1378474/e2c085668a827762eb6a4faab981abe266615f07/blerp.py" style="float:right;">view raw</a>
<a href="https://gist.github.com/1378474#file_blerp.py" style="float:right;margin-right:10px;color:#666">blerp.py</a>
<a href="https://gist.github.com/1378474">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
</div>
</div>
</div>
The usage of hoverslide looks something like this:
$(document).ready(function() {
$(".gist").hoverSlide(330);
}
The styling for gist is pulled from this css which I’ve included in my header and made small changes to.