Jekyll Blog in GitHub Codespaces

These are notes copied from the of my public blog (the one you are reading now).

Jekyll and GitHub pages have proven to a be a low friction workflow for curating and publishing posts. Making changes to the blog and debugging before publishing are made easier with this GitHub Codespaces workflow, since the environment now lives in the cloud, and does not need maintaining on PC.

Replicating this Workflow

Assuming an existing GitHub repository, create a new codespace.

Once started, configure the codespace with the command to create the devcontainer.json configuration file:

> Codespaces: Configure Development Container Features

devcontainer.json is set up running Ubuntu with the Ruby feature:

"features": {
    "ruby": "3.1"

Following codespace container build / rebuild. Jekyll needs to be installed:

$ gem install jekyll bundler

Check with

$ jekyll -v

You will likely need to install gems from Gemfile.lock

$ bundle install

Due to error cannot load such file -- webrick (LoadError), you may need to add the following package. (Ref:

$ bundle add webrick

To create a new blog template, run:

$ jekyll new <path>


To debug locally run:

$ jekyll serve


Simply commit to main branch and push to GitHub. GitHub has adapters for building and deploying.

Git Configuration

Merge strategy configured (defaults to merge):

 git config pull.rebase false