Hosting sites for free on Github

Posted by Hariharan Vadivelu on
In this blog I would like to explore how we can make use of GIT Pages to host websites for free, and not just hosting, GIT also makes it easy to manage your pages using prose.io CMS Lite tool.

Our software stack will be as follows

Github Pages hosting
http://prose.io/ CMS lite tool to edit pages
Google Analytics
Disqus for blog post comments
At a minimum you need to buy a domain name if would like to avoid accessing your site with git pages url, else you can access the site using http://USERNAME.github.io/
Prerequisite (Optional)

I have decided to manage my blog using Jekyll, but this is not mandatory, you may create a basic html site and host it on GIT. Github internally uses Jekyll engine and hence you have the luxury to code the page in Jekyll as well.

Since in this example we will explore building a blog and Jekyll makes it very easy to build a blog aware site
First install ruby and jekyll

Install rubygems followed by jekyll, on ubuntu I had to run following commands

sudo yum install ruby rubygems
sudo gem install jekyll
root@search:/home/search/git# git clone https://github.com/dbtek/jekyll-bootstrap-3 hariinfo.github.io

It is a good idea to begin with a template, I decided to make use of jekyll-bootstrap-3 which is a bootstrap 3 clone of Jekyll bootstrap
I got following error while installing jekyll as sudo account, so make sure you install jekyll as root.

ERROR:  While executing gem ... (Errno::EACCES) Permission denied - /var/lib/gems

Prepare your system to host jekyll powered blogger locally

$ mkdir jekyll_workspace
$ cd jekyll_workspace/
~/jekyll_workHost your site / blog on the internet
space/ $sudo gem install jekyll jekyll-import

-- This will take a while before importing all the libraries

~/jekyll_workspace $ jekyll new gblog

Migrating the existing Blog

First we need to install the jekyll-import gem module as follows

gem install jekyll-import

You can read more about this module here https://github.com/jekyll/jekyll-import

Blogger provides an option to export entire blog as Atom feed, but unfortunately there is no
jekyll importer as of this writing to import an ATOM feed.

Export the blog as RSS feed
http://<NAME>.blogspot.com/feeds/posts/default?alt=rss&max-results=<RECORDS>
Replace name with your blog name and RECORDS with the number of posts you would like to export.
E.g. I used this to export my blog and upto 500 posts, there isn't a nice way to export all so you will
have to count all the posts before exporting all records.

curl -o gdata.xml http://techhari.blogspot.com/feeds/posts/default?alt=rss&max-results=500

ruby -rubygems -e 'require "jekyll-import";JekyllImport::Importers::RSS.run({"source" => "gdata.xml"})'
Start the server and access localhost:4000 to visit the new jekyll powered blog.


~/jekyll_workspace/gblog $ jekyll serve
Configuration file: /home/hari/jekyll_workspace/gblog/_config.yml
            Source: /home/hari/jekyll_workspace/gblog
       Destination: /home/hari/jekyll_workspace/gblog/_site
      Generating... done.
    Server address: http://0.0.0.0:4000
  Server running... press ctrl-c to stop.

Host your site / blog on the internet

Github pages support Jekyll websites, so it should be easy for us to now
publish the locally created blog site to github so the entire world can access your new site

Create a new project respository on github with following naming convention
USERNAME.github.com

where <USERNAME> is your github name.


41 comments:

  1. Git and Github Online Training
    www.21cssindia.com/courses/git-and-github-online-training-248.html
    Familiarization with Git and DVCS concepts; Introduction to the Github platform; Repository creation on the web and desktop; Document versioning with local ...Many more… | Call Us +917386622889 - contact@21cssindia.com
    Visit: http://www.21cssindia.com/courses.html

    ReplyDelete
  2. Git and Github Online Training, ONLINE TRAINING – IT SUPPORT – CORPORATE TRAINING http://www.21cssindia.com/courses/git-and-github-online-training-248.html The 21st Century Software Solutions of India offers one of the Largest conglomerations of Software Training, IT Support, Corporate Training institute in India - +919000444287 - +917386622889 - Visakhapatnam,Hyderabad Git and Github Online Training, Git and Github Training, Git and Github, Git and Github Online Training| Git and Github Training| Git and Github| "Courses at 21st Century Software Solutions
    Talend Online Training -Hyperion Online Training - IBM Unica Online Training - Siteminder Online Training - SharePoint Online Training - Informatica Online Training - SalesForce Online Training - Many more… | Call Us +917386622889 - +919000444287 - contact@21cssindia.com
    Visit: http://www.21cssindia.com/courses.html"

    ReplyDelete
  3. Thanks for information,we are providing http://www.keentechnologies.com/sap-crm_technical-online-training.html.For more details visit our website.

    ReplyDelete

  4. Interesting blog about website development. It would be great if you can provide more details about it. Thank you...


    Website design company & Website development company in India

    ReplyDelete
  5. Your post has everything that is obtained complete and really useful. This post is very good. Thank you for presenting a very good post.
    cms web development company

    ReplyDelete
  6. Our sales training techniques have proper guidance to teach you how to sell and how to close business. The topics covered are great EBOOKS and general information
    to facilitate your learning about closing business and getting new customers to buy from you. Sales training is a wide subject and involves usage of many methods and
    theories and is best to gather information form many sources and put things into practice to see what works bet for you. Attention has also been given in our sales
    training guide by providing you Ebooks with many different categories that can help you close more business. It is critical in business, if you are involved in sales
    that you focus on getting results.
    How To close

    ReplyDelete
  7. http://www.21cssindia.com/courses/hyperion-essbase-and-planning-online-training-180.html Hyperion Essbase and Planning Online Training Hyperion Essbase and Planning, Hyperion Essbase and Planning Training, Hyperion Essbase and Planning | Hyperion Essbase and Planning Training|

    ReplyDelete
  8. It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us. CMS Website Design || CMS Website Developer || CMS website development company

    ReplyDelete
  9. Excellent post, I agree with you 100%! I’m always scouring the Internet for new information and learning whatever I can, and in doing so I sometimes leave comments on blogs. Web Designing || Web Designing in Mumbai || Website Maintenance

    ReplyDelete
  10. Thanks for nice post. It is complicated to me now, but in typical, the efficiency and significance is annoying. Very much thanks again and best of luck!Thanks for sharing. Website Maintenance in Mumbai || Website Development || Website Development in Mumbai

    ReplyDelete
  11. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me. Dynamic Website Designing || Dynamic website Designing in Mumbai || Ecommerce website Designing

    ReplyDelete
  12. Nice Posting! because there are a lot of informative postings so, thanks a lot for sharing the information. Ecommerce website Designing in Mumbai || Ecommerce Solution || Ecommerce Solution in Mumbai

    ReplyDelete
  13. This site is so nice and good point of view.Nice information with effective matters are share.Thanks for this useful post. Keep it up!!!


    Web development company in hastings & Web Development company in Uk

    ReplyDelete
  14. Nice blog, thanks for sharing. Web design mumbai is in huge demand. Attrait Solutions is the top IT Company providing best development services including SEO services also.

    ReplyDelete
  15. Nice blog. In today's demanding business environment which prioritizes flexibility, speed, and efficiency, a robust IT strategy is critical. We help you achieve these qualities by providing IT services in hyderabad.

    ReplyDelete
  16. This page is insightful and helpful. Lots of people will assert that everything in your site is great. :) you can also visit Attrait Solutions website for SEO Companies In Nagpur.

    ReplyDelete
  17. Thanks for all your information, Website is very nice and informative content.
    jogos de friv
    girlsgogames.com
    juegos de autos

    ReplyDelete
  18. IQ Online Training Portal offers SAP Hybris Online training throughout the world and is specialists in online training and will provide both function and technical course.
    sap hybris online training

    ReplyDelete
  19. Thanks for the very informative blog and I extremely grateful that you perform this piece of writing very simply, I mean to say that it's quite simple to read and understand. Web Design Bangalore | Web Development Company Bangalore

    ReplyDelete

  20. I would like to thank you for the efforts you have put in penning this site. I’m hoping to view the same high-grade content by you later on as well. In fact, your creative writing abilities has inspired me to get my own site now
    Hadoop Online Training

    ReplyDelete
  21. Having read this I believed it was rather enlightening. I appreciate you spending some time and energy to put this information together. I once again find myself personally spending way too much time both reading and leaving comments. But so what, it was still worthwhile!
    SAP APO Online Training

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. Thanks for sharing excellent information. Your site is very cool . I am impressed by the details that you have on this site.
    msgsnd
    luvlap

    ReplyDelete
  24. Tfw you spend more time prrepping your stage intro than the actual match...
    Unblocked, friv 2

    ReplyDelete
  25. Big data training .All the basic and get the full knowledge of hadoop.
    Big data training


    ReplyDelete
  26. Thanks for sharing with us. Keep up the good work. girlsgogames

    ReplyDelete
  27. Well explained. Got to learn new things from your Blog on Appium.Appium training in chennai

    ReplyDelete
  28. This comment has been removed by the author.

    ReplyDelete
  29. Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!

    ReplyDelete
  30. I think this article will fully complement you article. PLease continue publishing helpful topics like this. Regards, from Always Open Commerce

    ReplyDelete
  31. This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
    Java Training in Chennai

    ReplyDelete
  32. Great post! This is for a good information, It's very helpful for this blog. And great valu for these information.This is good work you and you are doing well.
    Analytics Training in Chennai

    ReplyDelete
  33. Great blog created by you. I read your blog, its best and useful information. You have done a great work. Super blogging and keep it up.php jobs in hyderabad.

    ReplyDelete
  34. • Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updatingAzure Online Training Bangalore

    ReplyDelete
  35. I read this article. I think You put a lot of effort to create this article. I appreciate your work.
    thesis Writing Service

    ReplyDelete