oEmbed Gist into WordPress

I just stumbled across a cool way to oEmbed a Gist directly into a WordPress post.  This means that rather than copying the js embed code from a Gist I can simply paste out the link to a Gist instead.  Nice

I had a little trouble getting it to work though.  First I had to remove an extra ” in line 12 then the script it generated just showed up as plain text on the front-end, but it got me playing with the idea since I like to use Gists.

After a little searching to see what else was out there, I found out that Jetpack offers Gist oEmbed shortcodes as one of it’s many features.  Sweet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s