git

Serving raw files directly from Github

We usually create HTML files in our Github repositories, but how to show this data in the browser? RawGit is a solution to serve files with the correct content types.

Example: The WordPress readme.html file can be shown in the following URL:

https://rawgit.com/WordPress/WordPress/master/readme.html

You only need to follow the formula:

https://rawgit.com/USER/REPOSITORY/BRANCH/file.html

The advantage of using RawGit over Github Pages is that RawGit works with all branches, while Github Pages requires a gh-pages branch. Last not the least, the source code of this solution is also available in Github.

Interactions

Webmentions

Like this content? Buy me a coffeeor share around:

0 Like

0 Reply & Share