That’s a typo in the doc. It should be fixed. fix: Use `=` instead of `:=` for variable reassignments by kaushalmodi · Pull Request #1771 · gohugoio/hugoDocs · GitHub
Only the first assignment uses :=
. Think of it as a variable declaration. Re-assignments use =
.