Rebooting the Blog with Pixi and Hugo

Every time I returned to this blog after a few months, I’d face the same Ruby dependency dance—version conflicts, rbenv wrestling, the works. Jekyll served me well, but the Ruby ecosystem friction was real.

So I migrated to Hugo and Pixi. Here’s my entire setup:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[workspace]
channels = ["conda-forge"]
platforms = ["osx-arm64", "linux-64"]

[tasks]
serve = "hugo server -D --bind 0.0.0.0"
build = "hugo --minify"

[dependencies]
hugo = ">=0.139.0"

Now anyone can clone this repo and run pixi run serve. No Ruby. No Bundler. Just Hugo from conda-forge.

GitHub Actions with Pixi

The deployment is handled by a GitHub Action that uses setup-pixi:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Pixi
        uses: prefix-dev/setup-pixi@v0.8.1
        with:
          pixi-version: v0.39.5
          cache: true

      - name: Build with Hugo
        run: pixi run build
        env:
          HUGO_ENVIRONMENT: production

      - uses: actions/upload-pages-artifact@v3
        with:
          path: ./public

  deploy:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/deploy-pages@v4

Push to master, Pixi installs Hugo, Hugo builds the site, GitHub Pages deploys it. Done.

While I was at it, I refreshed the typography with Crimson Pro and some blue accents. The blog needed it.