Creating my blog on GitHub Pages

I have decided to create my blog using GitHub Pages and Jekyll, to have more control over the whole publishing process while practising with the command line and Git at the same time.

I followed these steps:


We will create a new repository on GitHub named, where username is your username on GitHub (in my case,


Assuming we already have Ruby set up on our machine (see Setting up my development environment), we will install Jekyll and Bundler in one go, and we will create a new Jekyll project with the same name as the repo we just created:

$ gem install jekyll bundler # install jekyll and bundler
$ jekyll new # create new jekyll project

We use Bundler to install the project’s dependencies:

$ cd
$ bundle install # install dependencies

Now we execute Jekyll locally to view our site:

$ bundle exec jekyll serve # serve generated site

Go to http://localhost:4000 using your browser to check out the results.


We will initialise a Git repository inside the folder containing our Jekyll project, and add a remote pointing to the repository we created previously on GitHub:

$ git init # init repo
$ git remote add origin # add remote

Now we will commit all our changes and push them to the remote:

$ git add . # stage changes
$ git commit -m 'Initial commit' # commit changes
$ git push --set-upstream origin master # push changes and set a default remote

Finally, accessing we will see the website published. Any changes we commit and push to the remote from now on will cause the website to be automatically updated.

« Setting up my development environment Ignoring files with .gitignore »