Using rawgit cdn on github repository

When our public repository is not popular enough to be hosted on any CDN service, we can still reference to github url not needed to host it privately on the server get it locally on the server and having CDN benifit as usual (performance, bandwidth…)

Why not using directly the Raw GitHub url?

Use web browser we can view raw content of a css/js file on github directly, such as this but content type of the response stream is always text/plan, not text/css, then this file is not understandable as our expected.

_config.yml

Use rawgit

Simply take a github url and go to rawgit.com and paste to its input. You get it then.

_config.yml

Rawgit uses MaxCDN behind but it does not guarantee to be 100% up ;)

References

  1. [rawgit faq] (https://rawgit.com/faq)
Written on August 21, 2015

Tags