Embedding Github Gist to tumblr

It’s using writeCapture, which depends on (although not required) jQuery, but to simplify things, I’ll just use jQuery for the embedding code. This way, people who sees the post from dashboard still see the gist URL, and everyone else will see the gist embedded.

What’s inside embedgist.js:

$(document).ready(function() { $('.gist').each(function(i) { writeCapture.html(this, '<script src="'+$(this).text()+'.js"></script>'); }); });

PS: Of course, with writeCapture you embed everything blocked by tumblr. But as Uncle Ben said, “with great power comes great responsibility.”

#github #gist #tumblr #theme

Posted 6 months ago with 12 notes


  1. niwaringo reblogged this from soemarko
  2. pchumpy reblogged this from soemarko and added:
    reblogging this for my own convenience :-)
  3. soemarko posted this