Github Pages: Static Site generation with Jeykll

Jekyll Overview


Local Preview using Jekyll

Installation

sudo gem install jekyll

Initialize Jekyll

jekyll new .
# or
jekyll new . --force

Start local server

bundle exec jekyll serve
bundle exec jekyll serve --livereload --incremental

File Structure

Priority

  • index.html
  • index.md
  • README.md

Jekyll Configuration

_config.yml

baseurl: "/Coder"
url: "https://markusdoppler.github.io"

YAML Front Matter

---
title: Page Title
---

use data in Fluid template as such

site.title

Custom Jekyll Theme

  1. Copy theme folders from e.g. the minima theme
open $(bundle info --path minima)
  1. in _config.yml remove jekyll theme
# theme: minima
  1. in the Gemfile remove jekyll theme dependence
# gem "minima", "~> 2.5"
  1. type bundle update
  2. type bundle exec jekyll serve --livereload