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