Jekyll on sourcehut pages
In a New Year’s resolution-driven attempt to un-Microsoft-ify my life, I’m moving all of my repositories over from GitHub (owned by Microsoft) to sourcehut (owned by some dude). This blog was the first repo to make the switch and was previously hosted via GitHub Pages, and now uses sourcehut pages instead. Here’s the config I created to make the CI-driven deployment work:
image: alpine/edge
oauth: pages.sr.ht/PAGES:RW
packages:
- hut
- ruby-full
- ruby-dev
sources:
- https://git.sr.ht/~eddy/luten.dev
environment:
site: luten.dev
JEKYLL_ENV: production
tasks:
- setup: |
cd $site
bundle config set --local path vendor/bundle
bundle install
bundle exec jekyll build -d _site
- package: |
cd $site
tar -cvz -f site.tar.gz -C _site .
- upload: |
cd $site
hut pages publish -d $site site.tar.gz
There were some caveats to making this work properly:
- Install
ruby-fullrather than the baserubypackage since without it, things like bundler won’t work well (if you install bundler separately). - Set the Bundler path to something local to prevent issues with cache write permissions.
- Install
ruby-devalongsideruby-fullsince Jekyll needs this package to compile some native resources.
You can probably simplify this a bit more by rolling each tasks into a single super-task. The rest of the build steps are fairly similar to how I had set up my GitHub Pages tasks, but much less verbose.
Edit (2026-01-06):
Something I noticed only after deployment is that the specific theme I use (Minimal Mistakes) loads Font Awesome via a CDN and won’t work on sourcehut pages due to their content security policy (CSP) header settings. To fix this, in my specific case, I had to host the Font Awesome files myself.
However, loading more than 250KB to display a few icons here or there seems a bit excessive, so I’ll probably strip that dependency out eventually.



