hippietrailDomenic提出了一个问题:Can I run HTML files directly from GitHub, instead of just viewing their source?,或许与您遇到的问题类似。
An alternative to http://htmlpreview.github.com would be http://rawgithub.com. It provides a more convenient way to preview your files.
Update: The site has been renamed to http://rawgit.com
Before:
https://raw.githubusercontent.com/[user]/[repository]/[branch]/[filename.ext]
In your case .html extension
After:
https://rawgit.com/[user]/[repository]/[branch]/[filename.ext]
In your case .html extension
Now it seems to be able to use CDN in production as well, which is pretty cool:
https://cdn.rawgit.com/[user]/[repository]/[branch]/[filename.ext]
You can also serve gists
Before:
https://gist.github.com/[user]/[gist]
After:
https://rawgit.com/[user]/[gist]/raw/
CDN:
https://cdn.rawgit.com/[user]/[gist]/raw/
希望本文对你有帮助,欢迎支持JavaScript中文网