Migrating all my writings to Github pages

less than 1 minute read


  • Ruby
  • Gem
  • Bundler

Installing / Updating ruby

from https://jekyllrb.com/docs/installation/macos/

brew upgrade ruby

For some reason, it didn’t succeed. I had to run a couple of more commands. It complained that homebrew-core and homebrew-case are shallow clones

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

Then I added the ruby path to my ~/.zshrc

export PATH="/usr/local/opt/ruby/bin:$PATH"
export PATH="$HOME/.gem/ruby/X.X.0/bin:$PATH"

Install jekyll

gem install --user-install bundler jekyll

Install bundler (https://bundler.io/)

gem install bundler

Create a new jekyll site

>> jekyll -v 
   jekyll 4.2.0
>> jekyll 4.2.0 new .

Open a gem file and enable gitub pages.

# comment this
# gem "jekyll", "~> 4.2.0"

# uncomment this
gem "github-pages", group: :jekyll_plugins

now run the site

bundle exec jekyll serve