an intro to

and GitHub Pages

w/jekyll

Static Site Generator

Jekyll is based in Ruby so getting setup is as easy as installing a gem.

Looking at what you get

  • _config.yml
  • index.html - about.html
  • _includes, _layouts, _posts
  • css - _sass

Build your project

~ $ jekyll build

# builds project and creates a _site folder

~ $ jekyll build --watch

# builds site folder and watches files for changes

Look at _site/

View your project with a local server

~ $ jekyll serve

# => serving on port 4000

~ $ jekyll serve --watch

# => running server and watching files

Edit your project and keep Jekyll watching

  • the --watch flag
  • editing config
  • editing files

 

Setup GitHub and a git repo for your project

  • create a repo

  • clone the repo down to local

  • add jekyll files to the repo root

  • push back up

  • (still not done)

Setup GitHub Pages for repo

  • make a gh-pages branch in your repo

  • go to GitHub settings for the repo and make gh-pages the primary branch

  • username.github.com/repo-name/ (may need to mess with the jekyll config)

- Develop locally 

- Push up 

- View live

username.github.io/reponame/

Questions?

Intro to Jekyll

By Adam Moore

Intro to Jekyll

  • 1,299