Blogger Tutorials

How To Host Your Javascript and CSS Files on Github – Google Drive Hosting Alternative

Here I am with a latest query about Hosting under which I will tell you about how you can store your javascript and CSS files on Github as a host. Recently Google shut down its Google Drive hosting service, which got deprecated as of August 31st, 2015 and completely shut down on August 31st, 2016 – at this point peoples will no longer be able to access content via googledrive.com/host/[doc id].
This is not a problem for those users who have purchased hosting services to host their websites but there are many persons who can’t afford it so they may be looking for an alternative. So based on many request I found a way to host your importance Javascript and CSS files for free by using GitHub.

GitHub is a web-based Git repository hosting service. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project. Yeah! this is the same GitHub which was recommended by Google when it has shut down its Google Code but we given an alternative to host your files on Google Drive. I don’t know why Google is mercilessly killing all its popular products but its not a matter of tension because I am gonna show you how you can host your files on GitHub.

Here Are The Steps Which Needs To Be Followed

Simply go to GitHub.com and signup by filling some requested information like username, E-mail ID, password.

After Registering an account you need to sign in to your account and need to create a space for storing file. Here, its called Repository. You need need to create a new Repository.
After clicking on “New repository” a new window will appear where you need to set up a name for your repository and select type of repository and click on “Create Repository”.
After clicking on Create Repository a new window will appear which will have many options as show in below screenshot.

Now, you are almost done and now you only need to upload files which you can done via “Upload Files”
After uploading the file search the file [where README.md is shown in above screenshot] and click on it and a new window will appear.

The New window will be the opened file in GitHub and all you need to click on “Raw” as shown above.

Now a new window will appear which will show your Raw file content along with its Link. So all you have to do it is to copy the link which should in below format:

https://raw.githubusercontent.com/username/repository/master/filename.extension

Now Final Step to Implement Your Files for Usage

To implement your files on blog and website you just need to add the below line of code where you want them to be place
For JavaScripts
<script src=’https://raw.githubusercontent.com/username/repository/master/filename.extension‘ type=’text/javascript’></script>
For CSS files
<link rel=”stylesheet” type=”text/css” href=”https://raw.githubusercontent.com/username/repository/master/filename.extension” />
Note: You only need to change one thing in above code i.e.  https://raw.githubusercontent.com/username/repository/master/filename.extension with your file’s url.

Article written by:

Satyendra is a market researcher from the city of nawabs, Lucknow. Apart from blogging, his other interests are Indian rap knowledge, affiliate marketing, research, and basically anything nerdy.

Join the discussion

  1. jhon

    75 Unique Da 50seo Mix Backlinks
    Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work

  2. Shawn

    Discover all that you can appreciate from the store separated from experiencing the distinctive applications, surveys and appraisals There is simply so much you can improve deal with the application and make the most of your gadget all the more consistently. google play

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

back to top