Create a gist now

Instantly share code, notes, and snippets.

@benbalter /gist.md
Last active Jun 30, 2016

Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

And here's what it would look like rendered:

Rendered Gist

@lowellk

The rendered output looks odd for the gist link

@Pyrolistical

I wonder if being meta makes this harder to understand.

@zeke

gistception

@sliceofcode

Wow, this addition looks useful.

@attilaolah

Is there a way to embed a single file? Yes there is!

{% gist 5555251 gist.md %}
@kidlj

Nice tip. forked.

@LeahCim

Cool, thanks!

@abhiesa

No solution, till end, what is cool, i don't understand.
Just contacted Github, and put this as a feature request.
Hope, that anybody sees this, will also do the same.

@h4ckm03d

very useful, thanks. 👯

@Gowzancha

is this feature still working guys? i couldn't get it to work!!

@iplus26

Yes, it works and it's pretty!

@ryanpcmcquen

What about for non-gists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment