Web

Hugo .Site.Params.Author

I dusted off the site and was going to write about my experience updating Debian 12 Bookworm to Debian 13 Trixie on two servers. I use Hugo with the Mainroad theme and I hadn’t updated the site in quite a while. I updated Hugo to the latest stable version and tried to rebuild the site to include the new content. I ran into an error.

The error was:

.Site.Author was deprecated in Hugo v0.124.0 and subsequently removed.
 Implement taxonomy 'author' or use .Site.Params.Author instead.  

I grepped the files in the theme and found .Site.Author in two files - author.html and authorbox.html. I replaced all the instances of “.Site.Author” with “.Site.Params.Author”. I also changed the “Site.Params.Author.avatar” to “Site.Params.Author.image”. Authorbox was now activated but nothing was displaying. So I looked at a couple of other newer themes to see what parameter names in config.toml needed to be changed. The “[Author]” section I renamed to [Params.author]" and changed “avatar” to “image”.