- Ruby (see below)
-
Install RVM: https://github.com/rvm/ubuntu_rvm#rvm-package-for-ubuntu
-
Install the applicable version of Ruby:
curl https://raw.githubusercontent.com/github/pages-gem/refs/heads/master/.ruby-version -o .ruby-version
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-installer | bash
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv install $(< .ruby-version)
In Windows, you can install the Chocolatey package manager (and subsequently, Ruby), via the following Powershell command (must be run with Administrator privileges):
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Then:
choco install ruby
-
cdinto project directorygem install bundler bundle install bundle update
For most with error with bundle install; delete Gemfile.lock and retry.
If confronted with the following error in when attempting to run bundle install PowerShell, MSYS2 could not be found. Please run 'ridk install', then:
- Execute:
Set-ExecutionPolicy -Scope CurrentUser - Specify:
remotesigned, and select[A] Yes to All - Execute:
ridk install
Another error (bundle install fails to build bigdecimal, per: rubygems/issues/8015 ):
- Execute:
sudo apt install clang - Execute:
export CC=/usr/bin/clang - Execute:
export CXX=/usr/bin/clang++
- Execute:
bundler exec jekyll serve(orbundler exec jekyll serve -Dto include 'Draft' content) - Preview your local Jekyll site in your web browser at localhost:4000.
If you are editing in WSL and viewing in a Windows browser, use:
./start_jekyll_wsl.shThis helper script:
- Stops stale Jekyll processes that are already occupying the target port.
- Starts Jekyll on
0.0.0.0with LiveReload and file polling. - Prints both
http://localhost:4000/and a WSL-IP fallback URL.
Optional: choose a different port (for example 4001):
./start_jekyll_wsl.sh 4001- Install Livereload plugin for Chrome
- Execute:
bundler exec guard
- Install node from command prompt (w/ admin privileges):
choco install nodejs - Reopen command prompt
- Run:
npm install -g livereloadx - Install the applicable Browser Extension
Once installed, run the following command in the project directory:
livereloadx _site
Further command line options are described within the LiveReloadX documentation.
- Add bitbucket credentials
git clone git@bitbucket.org:jack_barker/jackbarker-com-au_drafts.git _drafts
Our automated test suite prevents JavaScript minification issues that can break GitHub Pages deployment:
# Quick source-only test (fastest)
./test_js.sh source
# Test with drafts included
./test_js.sh drafts
# Full production test (CI mode)
./test_js.sh fullbundle exec htmlproofer ./_site --only-4xx --check-favicon --check-html --check-opengraph --assume-extension
The project uses GitHub Actions for automated testing:
- JavaScript Tests: Validates all JavaScript for minification compatibility
- HTML Validation: Checks links, images, and HTML structure
- Draft Testing: Includes draft content to catch issues before publication
Tests run automatically on:
- Push to
gh-pages,main, ormasterbranches - Pull requests to these branches
- Manual workflow triggers
To catch JavaScript issues before committing:
# Install the pre-commit hook
cp pre-commit-hook.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commitThis will automatically run JavaScript tests before each commit and prevent commits that would break minification.
bundle exec yaspeller ./_site/**/*.html --ignore-urls
Requires bash shell and imagemagick.
To install imagemagick within WSL (Windows Subsystem for Linux):
sudo apt-get update
sudo apt-get install -y build-essential checkinstall
sudo apt-get install -y imagemagick libmagickcore-dev libmagickwand-dev libmagic-dev
cd
wget https://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-*
./configure
make clean
make
sudo make install
sudo ldconfig /usr/local/lib
Then, to compile images:
cd /mnt/c/.../jackbarker-com-au/images
./build_images.sh
Supported Markdown / Github emoji, is listed here.