Setting up GitHub Pages site locally with Jekyll
February 6, 2017 | Ruby macOS Windows 10In this post, we document how I set up my GitHub Pages site, Thus Spake Manjusri, locally with Jekyll, on both my 27” iMac 2010 and my XPS 15 9560 laptop.
macOS
Ruby 2.3 comes preinstalled on macOS 10.13 (High Sierra):
$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
Install the github-pages gem:
$ sudo gem install github-pages
which will install, among other things, jekyll as a dependency.
List all local gems:
$ gem list
Update all installed gems to the latest version:
$ sudo gem update
Clean up old versions of installed gems:
$ sudo gem cleanup
Serve the GitHub Pages site locally:
$ jekyll serve -w
Load the site http://127.0.0.1:40000/ in a browser.
Windows 10
On my XPS 15 9560 laptop, I use Ruby that comes preinstalled with Windows Subsystem for Linux:
$ ruby --version
ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-linux-gnu]
Install the github-pages gem:
$ sudo gem install github-pages
which will install, among other things, jekyll as a dependency.
List all local gems:
$ gem list
Update all installed gems to the latest version:
$ sudo gem update
Clean up old versions of installed gems:
$ sudo gem cleanup
Serve the GitHub Pages site locally:
$ jekyll serve -w
Load the site http://127.0.0.1:40000/ in a browser.