Versions:

  • Ruby: 3.3.5
  • Jekyll: 4.3.4
  • Jekyll/Minima: 2.5.2

Update Ruby:

_$: source $HOME/rvm.sh
_$: rvm install 3.3.5
_$: rvm use --default 3.3.5
_$: ruby --version
ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]

Create a new Jekyll site:

_$: cd /tmp
_$: jekyll new jekyll_new_434

Copy Gemfile and Gemfile.lock to your current blog:

_$: cp /tmp/jekyll_new_434/Gemfile /myblog
_$: cp /tmp/jekyll_new_434/Gemfile.lock /myblog

Patch the Gemfile to avoid warnings when building:

.../myblog/Gemfile:
-------------------
[...]
### Add to avoid warnings
gem "logger", "~> 1.6.2"
gem "csv", "~> 3.3.0"
gem "ostruct", "~> 0.6.1"
gem "base64", "~> 0.2.0"

Install gems:

_$: cd /myblog
_$: gem install --file Gemfile

Remove old SASS and CSS files:

_$: rm -rf /myblog/css
_$: rm -rf /myblog/_sass

Remove Jekyll ans SASS caches:

_$: rm -rf /myblog/.jekyll-cache/*
_$: rm -rf /myblog/.sass-cache/*

The minima theme it is insatalled as a gem theme. We need to find exactly where it has been installed:

_$: cd /myblog
_$: bundle info --path minima
$HOME/.rvm/gems/ruby-3.3.5/gems/minima-2.5.2

and patch the main.scss file changing the deprecated @import directive for the @use directive:

$HOME/.rvm/gems/ruby-3.3.5/gems/minima-2.5.2/assets/main.scss:
--------------------------------------------------------------
---
# Only the main Sass file needs front matter (the dashes are enough)
---

@use "minima";

Update your config file to use the minima theme:

.../myblog/_config:
-------------------
[...]
# Build settings
markdown: kramdown
theme: minima
[...]

Update the Liquid filters in index.html, _includes/head.html and _includes/header.html:

Old filter New filter
| prepend: site.url | relative_url
| prepend: site.baseurl | prepend: site.url | absolute_url

Build Jekyll:

_$: DIR=$HOME/myblog
_$: source $HOME/rvm.sh
_$: jekyll build \
    --source $DIR \
    --destination $DIR/_site

and serve your new site:

_$: DIR=$HOME/myblog
_$: source $HOME/rvm.sh
_$: jekyll serve