• Embedded Gists

    defunkt Jul 24

    Okay, this is obvious: you can now embed gists directly into your website, blog, project overview, myspace page, whatever.

    I’ve personally wanted this for a long time. May your code forever outlive your blog.

    • Comments

    • henrik about 3 hours later

      Nice!

      In addition to “view raw”, “download” would be nice, but I suppose that’s not there because gist downloads are unfinished altogether?

      If I were to use this on my blog, I think I would want to change “This Gist brought to you by Github” to something shorter, perhaps only a linked “gist.github” logo. Would you allow that? “Allow” in the approval sense, not in the add-a-feature sense.

    • PhilGeek about 4 hours later

      Is there a way that this could work with gists with multiple files?

    • sd about 6 hours later

      it looks like the generated html has a div with id=”gist”. That breaks the html if you try to embed more than one gist on a page. You probably want to do something like id=”gist2059”, and if possible, append a random number.

    • mbleigh about 6 hours later

      How does this work with multi-file Gists? I’d love to be able to Gistify my blog posts but keep all of the separate code sections together in a multi-file Gist.

    • arthurgeek about 7 hours later

      Nice feature! I miss gists with multiple files support.

    • britt about 9 hours later

      Awesome! The hits just keep on coming with you guys!

    • briandoll about 10 hours later

      Great feature!

      It does look like there may be a bug in the presentation of certain characters that are translated by the js, rather than printed to the screen.

      Here is a gist that contains newline and tab chars (\n, \t)
      http://gist.github.com/384

      The output translates the \n characters as newlines and the tab char as a tab. This could be specific to the language the gist is in, as this particular gist is in Bash (while the code itself is actually Awk, which isn’t supported).

    • JeremyBanks about 13 hours later

      Nice. I can see a plugin for different blogging software showing up some time, that’d be neat.

    • ryantm about 15 hours later

      one thing that I noticed is that this embedding doesn’t show up in Google Reader.

    • rgrove 2 days later

      What’s the point of using a table with a single row and a single column?

    • defunkt 2 days later

      @rgrove you’re right, that was leftover from when i had line numbers in the embed. it’ll be fixed in the next push.

    • dancroak 6 days later

      Having trouble with conflicting styles. Any advice on forcing the styles to look like it does above?

    Participate

    Please log in to comment.