And I get the following warning message with no changes made,
WARN 2022/11/15 00:44:37 module “github.com/gohugoio/hugo-mod-heroicons” not found; either add it as a Hugo Module or store it in “/Users/johnbonjovi/John/web/hugo-blog/themes”.: module does not exist
Need your help!
System parameters:
macOS Ventura, Version 13.0.1 (22A400)
hugo v0.105.0-0e3b42b4a9bdeb4d866210819fc6ddcf51582ffa+extended darwin/amd64 BuildDate=2022-10-28T12:29:05Z VendorInfo=gohugoio
Strangely, when I do hugo mod init hugo-blog in the root directory of my project (i.e. from within /Users/johnbonjovi/John/web/hugo-blog), I get very similar error message as above,
WARN 2022/11/15 14:05:18 module “github.com/gohugoio/hugo-mod-heroicons” not found; either add it as a Hugo Module or store it in “/Users/johnbonjovi/John/web/hugo-blog/themes”.: module does not exist
go: creating new go.mod: module hugo-blog
go: to add module requirements and sums:
go mod tidy
As jmooring pointed out above, the very first thing has to be hugo mod init foo/bar. Otherwise nothing will work!! So I started everything from scratch and sequence of instructions as follows,
Change directory to your website parent folder, cd /Users/johnbonjovi/John/web/hugo-blog/
Import note: make sure your config.toml does NOT contain active [module] or any [[module.imports]] sections. Else these instructions will fail.
From within that directory, initiate the website folder as module hugo mod init hugo-blog
Edit your config.toml, and add the [module] section, e.g.