Github provides free hosting of a static website for each user and for each project. These websites are generated using Jekyll which will process all files uploaded to an individual user account (master branch of a special repo named
USERNAME.github.io) or any project repos with a
This short guide will walk through the steps in setting up of a local “Jekyll” installation so that the website can be designed and its content reviewed before committing to Github.
baseurlin *_config.yml* should be set correspondingly as follow:
""for a user page and
"/NAME_OF_REPO"for a project page
jekyll serve --baseurl ""so that the pages can be found at “localhost:4000”.
gem 'github-pages'in a Gemfile in the repo’s root directory followed by a command
_siteinto .gitignore. The folder is generated for the local Jekyll installation only. Jekyll will re-build the site every time following a new upload or commit.
Creating Project Pages
$ git clone github.com/user/repo.git
$ cd repo
$ git checkout --orphan gh-pages
$ git rm -rf .
$ jekyll new .
$ git commit -am "new content added"
$ git push origin gh-pages