Instructions for GitHub Pages development 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>
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Original instructions here
Open the Windows 10 Microsoft Store and search for and install Ubuntu
sudo apt-get install ruby ruby-dev build-essential gcc g++ make zlib1g-dev
gem install jekyll bundler
cd /mnt/c/projects/github-pages/
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:
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