Skip to main content

Jekyll on Github Page

·2 mins

On Augusts 6 2018, I come back to the idea of using Jekyll to setup a site to host some of my notes. Both jekyll and the so-simple-theme have evolved since I first used them on March 2017. I therefore decide to build the site again with the updated theme.

Github-Page #

Follow instruction on the site to create a repository for hosting. I use a user page (not a project page).

Install Jekyll #

Follow instruction on Jekyll installation page. Will need sudo.

$ sudo gem install bundler jekyll

Start a Jekyll site for github-page #

Start a fresh site

# cd into the working directory
$ jekyll new .

Note the final . (current directory).

Setup for the so-simple-theme #

Check out so-simple-theme and follow the guides on github-page.

  1. Edit Gemfile (follow the instruction in the file):
    • Comment out: gem "jekyll", "~> 3.8.3"
    • Uncomment: gem "github-pages", group: :jekyll_plugins
  2. Edit _config.yml:
    • Comment out: theme: minima
    • Add remote_theme: "mmistakes/so-simple-theme"

At this time, the content is enough for github to generate a page.

Serving locally with Jekyll #

It is probably necessary to update gem when running for the first time

$ sudo bundle update

Afterward, should be able to serve and view the site locally

$ bundle exec jekyll serve

And then go to http://localhost:4000/ with a browser.

#

Reference #