Sources:
- AWESOME (this finally helped): Click here
- Docs - Testing your GitHub Pages site locally with Jekyll: Click here
- Docs - Creating a GitHub Pages site with Jekyll: Click here
- Jekyll docs: Click here
- Above docs suggested the additional install of
webrick
by runningbundle add webrick
which is necessary.
- Above docs suggested the additional install of
- Exclude folders from jekyll compilation, for e.g.,
node_modules
- Click here
Versions (tested on archlinux):
$ ruby --version
# OUTPUT:
# ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x86_64-linux]
$ bundler --version
# OUTPUT:
# Bundler version 2.5.6
Follow from this - Guide to run Gihtub pages locally with Jekyll
-
I had to do
sudo bundle install
using sudo otherwise I was getting permission error. -
Make
Gemfile
contents to look like that:
source "https://rubygems.org"
# Note to Sahil: 231 version specified below comes from this link - https://pages.github.com/versions/
gem "github-pages", "~> 231", group: :jekyll_plugins
gem "webrick", "~> 1.8"
- Add any
node_modules
directory to_config.yml
if you have any, otherwise ignore this step:
include: [".well-known"]
exclude: ["thoughts-principles-react/node_modules/*"]
- run the serve command with --livereload, when using below command with
sudo
the devlopment server seems to work (otherwise I get permission error):
sudo bundle exec jekyll serve --livereload --incremental
Thanks