How to Run HTML files in your Browser from GitHub

If you have a .html file in a Github repository and want to view that page directly, you would typically download or clone the repo to your local hard drive and run it from there.

There is an easier way

Simply navigate to the repo in your Github account that contains a HTML file as shown below:


Right-click the index.html file and select copy link address.


You should have a URL similar to the following structure:<your user name>/<your repo>/blob/master/index.html


As the name implies, rawgit shows serves the raw files directly from Github.

To use it simply use the following format:<your user name>/<your repo>/master/index.html

If you want to use it in production, you can use:<your user name>/<your repo>/master/index.html

That was easy now, wasn’t it!

Posted by: Michael Crump
Last revised: 03 Sep, 2014 01:54 PM


No comments yet. Be the first!

No new comments are allowed on this post.

Hosting provided by http://www.DiscountASP.NET