Build Websites with Hugo: Using with recent Hugo versions

Hi friends.

If you’re reading the book and trying to follow along with the first chapter, you’ll immediately find some major differences. Hugo has evolved considerably since I wrote this book. Now when you generate a new Hugo theme, you get a fairly well-defined template with some sensible defaults, so you don’t have to spend too much time in the second chapter getting things working.

Some notable changes:

  • config.toml is now called hugo.toml. However, config.toml still works.
  • The archetypes/default.md file now uses a TOML front matter syntax instead of YAML, although YAML still works fine.
  • hugo new theme basic generates a theme with many of the partials filled in. You should still be able to copy the files as-is and things should work.

However, if you’re looking to follow the book explicitly, download a binary release from GitHub:

Hope this helps anyone who’s gotten stuck.

1 Like