Embed A GitHub Gist File

Last updated on Friday, August 23rd, 2019 @ 2:50PM.

Have you ever wanted to embed just one of your Gists but you forget how? It is really easy: just use the embed code found near the top of the gist, copy it, and after putting it in your code you can attach ?file={specific-file-to-embed.ext}. That's it!

Still, if you don't embed Gist files enough to dedicate that to memory, you can also use this tool:

  1. Enter your GitHub user name (mine is westc) and click the Search button.
  2. Select and copy the embed code from below the Gist or Gist file that you want.
  3. Paste the copied code into the desired web page and "voilĂ ", you are done!

If you check out the API you will see that there is plenty more that you can do to show your Gists in whatever way you would like. Happy coding!