问题
I want to list all my gists on a single page and an iframe seemed like the quickest and easiest solution, the problem is that it won't load. My example show the same html used to make gist.github.com and google.com show in an iframe. Google will load but github won't.
Is this a limitation that Github imposes, is there a better way to list embed all my gists on a single page without adding each gist individually? I want it to show up automatically when I create a new one.
http://jsfiddle.net/guanome/VGEjB/1/
回答1:
Considering GitHub won't let you display its content with a frame, lime Rob mention in his answer (+1 btw), you could consider using the GitHub Api for Git.
That way, you build your own content.
回答2:
Github has added the X-Frame-Options: deny
HTTP header, which prevents the page from being embedded in a page (such as a frame).
See also: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header
回答3:
Forgive me, because I am a big newbie - but I may have a solution.
Couldn't you download the webpage down to local and then add that to the server that you're hosting as a resource. Then, just add an href to the actual github.
Or alternatively,
possibly change the webpage to a pdf/png, using a webpage to pdf/png extension. Then use the of the pdf/png. I did this and it worked for me, unfortunately it's static and won't be up-to-date.
来源:https://stackoverflow.com/questions/7649361/github-gist-page-wont-load-in-iframe