如何使用新的gist界面从GitHub gist中嵌入单个文件? [英] How do I embed a single file from a GitHub gist with the new gist interface?

查看:276
本文介绍了如何使用新的gist界面从GitHub gist中嵌入单个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新的GitHub Gist界面有一个嵌入片段,用于将所有文件嵌入到要点中的整个要点。旧界面为每个文件嵌入代码。任何人都知道是否有嵌入单个文件的技巧?

The new GitHub Gist interface has one embed snippet for the entire gist which embeds all files in the gist. The old interface had embed code for each file in the gist. Anyone know if there's a trick to embed a single file?

推荐答案

从左侧获取要点URL, .js 添加一个查询字符串,如?file = myFile.blah ,例如

Take the gist URL from the left-hand side and after the .js add a query string like ?file=myFile.blah, e.g.

<script src="https://gist.github.com/4505639.js?file=macroBuild.scala" type="text/javascript"></script>

这篇关于如何使用新的gist界面从GitHub gist中嵌入单个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆