2015-02-05 108 views

回答

2

一个GitHub的页面本身不会在IFRAME(直接把because of the X-Frame-Options: deny HTTP header)

这使得你与GitHub API for contents

GET /repos/:owner/:repo/contents/:path 

像:。https://api.github.com/repos/ileathan/hubot-mubot/contents/src/mubot.coffee

您应该能够put that content in a iframe (as in this answer)

+0

的ITs凌晨4:30,我需要去睡觉,所以我现在不能检查,但返回的内容加密与我的API密钥,或只是base64编码?顺便谢谢你。 –

+1

@Banned_User它应该只有base64编码。 – VonC

1

我刚刚找到了一种方法来使用Gist-it

使用

乘坐GitHub的文件网址,并用​​前缀,并嵌入一个标签内的结果:

<script src="http://gist-it.appspot.com/http://github.com/$file"></script> 

这里我只是做了一个试验。作品! :)

enter image description here

相关问题