Github:如何将要点嵌入到 README.md 中? [英] Github: How to embed a gist into README.md?
问题描述
是否可以将 gist 嵌入到 GitHub 存储库中的 README.md 文件中?
类似于:
更新:我的回答适用于通过 jekyll 构建的 github 页面.我在 markdown 中使用 script 标签,然后由 jekyll 处理.
由于 markdown 支持 html,所以可以简单地使用 标签来嵌入 gist.
只需复制
..并将其粘贴到您的 Markdown 文件中.
示例:复制以下内容并粘贴到您的 Markdown 文件中.
..这就是你会得到的
Is it possible to embed gists into README.md file that resides in a GitHub repository?
Something like:
<code id="gist-3167145"></code>
Update : My answer works with github pages, built via jekyll. I use the script tags in markdown which is then processed by jekyll.
Since markdown supports html, one can simply use the <script>
tag to embed gist.
Simply copy the embed url of the gist provided by github
..and paste it in you markdown file.
Example : Copy the below and paste in your markdown file.
<script src="https://gist.github.com/nisrulz/11c0d63428b108f10c83.js"></script>
..and this is what you will get
这篇关于Github:如何将要点嵌入到 README.md 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!