Featured image of post A new life for the blog on Hugo

A new life for the blog on Hugo

I moved the blog to Hugo, switched deployment to GitHub Actions, and decided to give the site a fresh start.

I was moving sites to a new host and decided to dust off the shelves and work on my blog again. The previous version was powered by the static site generator Jekyll . That was sometimes awkward: Ruby dependencies, and occasional vulnerability alerts from GitHub’s security bot (though for local work those were never critical). Meanwhile, Hugo kept popping up in Go-related Telegram channels.

Hugo is a static site generator written in Go. According to the official site, it is “the world’s fastest framework for building websites.” Hugo ships as a normal binary (you can install it on Linux, macOS, or Windows) and includes a powerful templating system.

To get started you pick a theme . I ended up liking hugo-theme-stack : it is minimal without extra noise, has handy menus, categories, tags, and more—and the documentation is detailed.

Next I adapted the repo on GitHub . I dropped the old Travis CI pipeline and replaced it with GitHub Actions. Finding actions for build and deploy took just a few minutes. I used peaceiris/actions-hugo for the build and SamKirkland/FTP-Deploy-Action for FTP deploy to hosting. The result looks like this—simple and effective!

 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
27
jobs:
  deploy:
    runs-on: ubuntu-22.04
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v3
        with:
          hugo-version: '0.160.0'
          extended: true

      - name: Build
        run: hugo --minify

      - name: Deploy
        uses: SamKirkland/FTP-Deploy-Action@v4.3.5
        with:
          local-dir: ./public/
          server: ${{ secrets.server }}
          username: ${{ secrets.username }}
          password: ${{ secrets.password }}
Built with Hugo
Theme Stack designed by Jimmy