Tutorial: Jekyll - Static Site Generator


Creating a Site

  • locally
jekyll new <site>
bundle exec jekyll serve

Hosting on Github Pages

New repository

git init
git checkout -b gh-pages
git status
git add .
git commit -m "initial commit"
git remote add origin http://github.com/githubusername/newrepositoryname.git
git push origin gh-pages

costum domain

  1. Configuring A records with your DNS provider will point your custom domain to the following IP addresses

    • 185.199.108.153
    • 185.199.109.153
    • 185.199.110.153
    • 185.199.111.153

    Add in one CNAME record for your custom domain then github will create CNAME file in your github repo automatically.

  2. Edit your _config.yml file in your project folder.

cd your project folder
vi `_config.yml`
url: "http://yourcoustomdomain.com"

update changes to site

git add .
git commit -m "commit messages"
git push origin gh-pages