Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 2.87 KB

README-new.md

File metadata and controls

72 lines (52 loc) · 2.87 KB

Running your github pages site locally with jekyll

Sources:

Notes for MacOS (Dec 2024)

Installing ruby: Search for Installing rvm - Learn MacOS

Note: You only need to use below commands (tested with ruby version 3.3.0)

# install dependencies
bundle install

# run server
bundle exec jekyll serve --livereload --incremental

# to expose on internal ip address
bundle exec jekyll serve --livereload --incremental --host=0.0.0.0

Notes for Archlinux (June 2024)

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

  1. I had to do sudo bundle install using sudo otherwise I was getting permission error.

  2. 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"
  1. 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/*"]
  1. run the serve command with --livereload, when using below command with sudo the devlopment server seems to work (otherwise I get permission error):
# run server
sudo bundle exec jekyll serve --livereload --incremental

# to expose on internal ip address
bundle exec jekyll serve --livereload --incremental --host=0.0.0.0