mourjo / blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blog

My personal blog, published here.

Install Jekyll

This uses Jekyll 4.2.0.

brew install ruby
brew install rbenv
rbenv init

If on Ubuntu, uninstall ruby-build from package-manager to get the latest Ruby versions in rbenv.

sudo apt remove ruby-build

# Install it as an rbenv plugin
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build

Add to .zshrc:

eval "$(rbenv init -)"
export PATH=$PATH:$HOME/.gem/ruby/3.0.0/bin

Install Jekyll:

# Install Ruby version
cd path/to/repo
ls .ruby-version
rbenv install

# Install jekyll locally (add --user-install if appropriate)
gem install bundler jekyll

# Install gems
bundle install

If there are some older gems that don't work, try uninstalling them and reinstalling it

gem uninstall ffi
gem install bundler jekyll
bundle install

After this, the correct Jekyll version should be installed

bundle exec jekyll -v
#jekyll 4.2.0

Serve using

bundle exec jekyll s

Publishing

Make all changes on any branch other than gh-pages. Generating the site is done by locally running Jekyll to build the site. Publishing is done by copying generated files from a branch (usually master) to gh-pages.

  1. Commit new changes (the Github actions bot changes already commits from feed URLs)
  2. Run make watchbuild and ensure the site looks good -- kill it once verified
  3. Run make build to perform cleanups
  4. Run make migrate -- this will copy the legacy permalinks to the right place
  5. Commit new changes, if any
  6. Run make publish -- this will change the branch to gh-pages
  7. Commit changes on the gh-pages branch
  8. Publish with git push

About

License:MIT License


Languages

Language:HTML 96.3%Language:SCSS 1.9%Language:CSS 1.4%Language:Shell 0.2%Language:Makefile 0.1%Language:Ruby 0.0%