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 %}
.
I wonder if being meta makes this harder to understand. |
gistception |
Wow, this addition looks useful. |
{% gist 5555251 gist.md %} |
Nice tip. forked. |
Cool, thanks! |
No solution, till end, what is cool, i don't understand. |
very useful, thanks. |
is this feature still working guys? i couldn't get it to work!! |
Yes, it works and it's pretty! |
What about for non-gists? |
I've tried and it doesn't work. I just paste gist embed code on page and it work |
It works by installing https://github.com/jekyll/jekyll-gist But I prefer to use: <script src="https://gist.github.com/benbalter/5555251.js"></script>
<script src="https://gist.github.com/benbalter/5555251.js?file=gist.md"></script> |
I tried to embed <script src="https://gist.github.com/benbalter/5555251.js"></script> and other examples in an .md file, however it doesnt work :( |
This didn't work for me . . . But, using the Embed code from the gist page worked, just fine. |
Note that for this to work, you need to have the following in your Gemfile:
This installs, among others, the jekyll-gist gem which provides the Of course, you could also have just The github-pages gem installs locally all the gems that are also installed on GitHub Pages, and the same versions of these gems. This ensures that your local build environment is the same as the build environment used on GitHub Pages. So, it is ensured that everything that works locally, will also work on GitHub Pages, and that the site will look the same on GitHub Pages as it looks on your local machine. You basically don't need anything else than |
Is there any way to link a revision of a gist file? |
^^^ I want this feature also!!! I want to be abled to embed each revision of a gist. |
What are you talking about |
This comment has been minimized.
The rendered output looks odd for the gist link