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.
- Setup GitHub Page on your GitHub repo
- Setup Jekyll on your local
- Setup a Jekyll theme
- Push local changes to GitHub repo & Test
Wohoo! Let’s start. There are few simple steps to get your website / blog ready.
- Signup on GitHub
Create a repository: Create a new repository named
username.github.io, where 'username' is your username (or organisation name) on GitHub.
- Install Jekyll on your local machine
gem install jekyll.
- Choose a Jekyll theme and download, unzip it on your local (I choose a blog theme Jekyll Uno)
Go to folder and follow instruction to install dependencies.
$ cd jekyll-uno/
$ gem install bundler
$ bundle install
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
Run local server
$ bundle exec jekyll serve. Go to ‘http://localhost:4000/’ and see your changes on browser.
Check sample post under ‘_post’ directory. You must use File naming format. Check Jekyll Doc to build & customise your blog / website.
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
- 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.