Saturday, 26 April 2014

How to host codes in google drive

How to host codes in google drive
You might have hosted your codes in google codes, but now google codes has discontinued its service of uploading codes. So, as an alternate option, we can use Google Drive to upload our codes. Using a small trick, you can upload your codes to google drive and get a direct link of the uploaded code to use with web projects. Let's see how to host codes in google drive.
1. Login to google drive.
2. Now click "Upload" button and click "Files".

click file

3. Now upload your CSS or JavaScript file.

uploading codes

4. After uploading the file, it will appear in your google drive. Just right click on the uploaded file and click Share > Share.

sharing code

5. A window will popup now. From that window, click "Change..." link.

sharing settings as public

6. Now set the visibility option to "Public"and then click "Save" button.

sharing codes as public

7. Now, let's convert the link of the uploaded file into the direct link to use it in webpages to add external codes. Just copy the part of the code url as shown in the image below.

copy the part of the code as shown in image

8. Now, replace the copied code with xxxxxxxxxxxxxxxxxxxxxxxxxx in the following code:

https://googledrive.com/host/xxxxxxxxxxxxxxxxxxxxxxxxxx

9. Now you have the direct link for your hosted code. To use it in your webpages, use the following codes:

For CSS : <link href='https://googledrive.com/host/xxxxxxxxxxxxxxxxxxxxxxxxxx' rel='stylesheet'/>
For Javascript : <script src='https://googledrive.com/host/xxxxxxxxxxxxxxxxxxxxxxxxxx' type='text/javascript'></script>

10. That's it. Enjoy web designing with google drive. :)
Keep visiting for more tips and tricks. Have a great time.
Share:

0 blogger:

Post a Comment

Custom Search Box

Earn Money With Crypto

WazirX

Offers and Deals

Blog Archive

Contact Form

Name

Email *

Message *