
bphogan
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 calledhugo.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:
- Release v0.63.0 · gohugoio/hugo · GitHub is the version used in the book. There’s no build for Applie Silicon chips though.
- Release v0.111.3 · gohugoio/hugo · GitHub works well with the book as well.
Hope this helps anyone who’s gotten stuck.
First Post!

ritgrad83
I was able to get to Chapter 4 - and got stuck on Pulling Data from Remote Sources where I see that getJason has been deprecated
I tried rewriting opens source.html as follows:
{{ define "main"}}
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ $repos := dict }}
{{ $url := printf "%s/%s/repos" .Site.Params.gh_url .Site.Params.gh_user }}
{{ with resources.Get $url }}
{{ with . | transform.Unmarshal }}
{{ $repos := . }}
{{ end }}
{{ else }}
<p>Error fetching data from GitHub API.</p>
{{ end }}
<section class="oss">
{{ range $repos }}
<article>
<h3><a href="{{ .html_url }}">{{.name }}</a></h3>
<p>{{ .description }}</p>
</article>
{{ end }}
</section>
{{ end }}
Still cannot get the JSON from the remote source
Any suggestions?
Popular Pragmatic Bookshelf topics










Other popular topics










Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /ocaml
- /react
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /zig
- /scala
- /textmate
- /sublime-text
- /lisp
- /nixos
- /debian
- /react-native
- /agda
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /django
- /spring
- /manjaro
- /diversity
- /nodejs
- /lua
- /c
- /julia
- /slackware
- /neovim