1/2 Free and secure static website or blog


If you are individual / small company and want to host your own website / blog. But you don’t want hassle to maintain your hosting site and looking for some simple & easy way to start. Then Github pages is the one you much check.

GitHub Pages, hosted directly from your GitHub repository. Just edit, push, and your website / blog is live. GitHub Pages are powered by Jekyll. Octopress is also another way to Jekyll based framework for same purpose.

Cloudflare gives security to your website / blog including SSL certificates.

Though I like Ghost. You should also check, if you are trying to start a blogging business.

Synopsis:

Part 1:

  1. Setup GitHub Page on your GitHub repo
  2. Setup Jekyll on your local
  3. Setup a Jekyll theme
  4. Push local changes to GitHub repo & Test

Wohoo! Let’s start. There are few simple steps to get your website / blog ready.

  1. Signup on GitHub
  2. Create a repository: Create a new repository named username.github.io, where 'username' is your username (or organisation name) on GitHub.

  3. Install Jekyll on your local machine gem install jekyll.
  4. Choose a Jekyll theme and download, unzip it on your local (I choose a blog theme Jekyll Uno)
  5. Go to folder and follow instruction to install dependencies.

    $ cd jekyll-uno/
    $ gem install bundler
    $ bundle install

  6. Open “_config.yml” file in any text editor and make changes for your own website. e.g. You should change below things to personalise it at-least

     title: 'Your Blog title'
     description: 'Blog description'
     url: 'blog url'
     baseurl: '/'
    
     author:
       name: 'Your name'
       email: your email id
       twitter_username: username
       github_username:  username
     
  7. Run local server $ bundle exec jekyll serve. Go to ‘http://localhost:4000/’ and see your changes on browser.

  8. Check sample post under ‘_post’ directory. You must use File naming format. Check Jekyll Doc to build & customise your blog / website.

  9. Now it’s time to push your blog to github.

    $ git init
    $ git add -A
    $ git commit -m "first commit"
    $ git remote add origin [email protected]:username/username.github.io.git
    Use your github repo here.
    $ git push -u origin master

  10. Let’s test, go to ‘http://username.github.io’ on browser. Yeeeee! That’s our first free blog serving over Github Pages.

This is the point where you choose either you want your own custom domain name or ‘username.github.io’ url works for you. There are way to enable https:// on your ‘username.github.io’ page. Check Eric Mill post here.

In the next post we will go through how to setup custom domain on github pages and DNS setting, security on Cloudflare.


Ashish Pandey

Bengaluru, India blog.ashishapy.com