github-pages

Instructions for GitHub Pages development on Windows 10

Setting up Jekyll on Windows 10

There is no offically supported Jekyll distribution on Windows.

This guide will use the Windows Subsystem for Linux (WSL) to install a Linux distribution on Windows 10 and then use that to install all the tools needed for Jekyll.

This needs a recent version of Windows 10 - at least 1809. You can check the Windows 10 version by holding the Windows Key + R, and then typing winver <Enter>

Install WSL

  1. Open a PowerShell window as Administrator and run:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    
  2. Restart the computer when prompted

Original instructions here

Install Ubuntu

Open the Windows 10 Microsoft Store and search for and install Ubuntu Ubuntu-App

Install Jekyll

  1. Open a Ubuntu terminal and install the ruby development environment
sudo apt-get install ruby ruby-dev build-essential gcc g++ make zlib1g-dev
  1. Install Jekyll
gem install jekyll bundler
  1. Run the Jekyll server on your markdown

Run Jekyll

bundle exec jekyll serve

If it is working you should see something like:

  Server address: http://127.0.0.1:4000
  Server running... press ctrl-c to stop.

Navigate to 127.0.0.1:4000 with a browser: localhost jekyll

Troubleshooting

if an error like this appears:

Could not locate Gemfile or .bundle/ directory

Then a Gemfile needs to be created in the root directory with the following contents

source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

If an error like this appears:

Could not find gem 'github-pages' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

Run ‘bundle install’ to download and install the additional files needed for github pages.

bundle install

Original instructions are here

Back