Created
November 26, 2011 16:18
-
-
Save soemarko/1395926 to your computer and use it in GitHub Desktop.
embed github gist to tumblr
This file contains 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
<!-- Add the following lines to theme's html code right before </head> --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
<!-- | |
Usage: just add <div class="gist">[gist URL]</div> | |
Example: <div class="gist">https://gist.github.com/1395926</div> | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works on desktop but seems to be broken on mobile: only the URL is displayed. Anyone else experiencing it?
Edit
It's Tumblr custom mobile theme that somehow break the gist. You must disable it in the blog appearance settings, under Advanced options at the bottom of the sidebar (where you can set custom CSS). But then the embed will take full width and break the page on mobile. To correct that :
.gist-data { max-width: 90vw; }
.