---
layout: post
author: Aaron
title: How to create a static website with Jekyll and deploy it on GitHubPages
---
Install Git Install Ruby
Install Jekyll and Bundler
Create a GitHub-account
Clone the repository to a local directory:
$ gem install jekyll bundler
Create a repository on GitHub
(It has to be public if you use GitHub Free, note that your code will be visible to everyone!)
SSH
Create two directories: docs and localDev.
$ mkdir docs
$ mkdir localDev
Move to the localDev-directory:
$ cd localDev
Create a new Jekyll-project at localDev-directory:
$ jekyll new --skip-bundle .
(make sure you got the dot)
Open the Gemfile that Jekyll created and comment out the line which starts with gem "jekyll"
Add the github-pages gem by editing the line starting with # gem "github-pages".
Change this line (# gem "github-pages") to:
gem "github-pages", "~> GITHUB-PAGES-VERSION", group: :jekyll_plugins
You can find the actual version of GitHub-pages here
.
Now save and close the Gemfile.
Now still being at the localDev-directory, install the bundle:
$ bundle install
Optionally you can create another branch called gh-pages from where GitHub Pages will take the website-files.
$ git checkout -b gh-pages