Friday, December 26, 2014

Easy Way to Host and Use CSS or JS File in Google Drive Free

host your file in Google drive

What is host or hosting stand for?

Keeping your files any virtual store or place for further use is simply hosting. You are now able to host various types of files for further use. You may need to host CSS, JS or images for use them to your blog or other website.

Why should we host files?

Blogger has no facilities to store extra files. If you want to use CSS or JS to modify your blog then you are bound to use them inline or internally. But SEO expert will recommend you to use external CSS and other codes if possible. Another important thing is using codes internally will decrease content ratio than codes. Search Engines always look for content not for codes. To decrease code ratio we should host files in a suitable virtual store like Google Drive.

Why should we host our files in Google Drive?

There are many providers to host your files. May be they are paid or free. But most of the people will recommend you Google Drive. Because it is free and provided by Google. We can depend on Google without little hesitation.

Easy way to host files in Google Drive

First Create a CSS file as you need to use in your blog or website. Suppose we want to modify heading and paragraph. Then create a CSS file to modify heading and paragraph.

1
2
3
4
5
6
7
8
9
10
11
12
#heading   {
            border: 2px solid #a1a1a1; 
            padding: 5px 10px; 
            background: #dddddd;
            width: auto;
            border-radius: 15px;
            }
#paragraph  {
            text-align: justify;
            font-family:courier;
            font-size:14;
            }
Save it as post.css
Now go to Google Drive and Sign in with gmail account.

Click on Create to create a folder and give a suitable name of your folder. If you use many files and folder the name will help you to recognize them.
Select your folder and click on share button.

Then click on Advance.

Then click on change.

Now select On-Public on the web from Link sharing and click Save.

Now open or double click on your newly created folder.

Upload your post.css file by clicking upload button.

After uploading select this file and and share this file On-Public on the web as you did before for your folder.

Easy way to use hosted file from google drive

When you click on share then you will see the link for respective file. Copy this link.

Now paste this link and see you will get it like this
https://drive.google.com/file/d/0B7zpCJBUlTXTMVRIUHkzSWhpYlE/view?usp=sharing
The bold part is your file id. That is 0B7zpCJBUlTXTMVRIUHkzSWhpYlE
https://googledrive.com/host/ Your file ID
That is
https://googledrive.com/host/0B7zpCJBUlTXTMVRIUHkzSWhpYlE

Now copy this code bellow
Now go your blogger Dashboard >> Template>> Edit HTML

Now paste this Code just after <head>
Now in your post where you use <h ="heading"> instead of <h> and <p="paragraph"> instead of <p >

Save your template and see the change.

In this way you can use your hosted CSS file as you want.

Enjoy your blogging


No comments:

Post a Comment

Contact

Name

Email *

Message *