Hello, I want to use the hugo-mods/icons
I get this error message when calling
hugo mod get -u
hugo mod get -u
go: no module dependencies to download
go: github.com/hugo-mods/icons: invalid github.com import path "github.com/hugo-mods"
Error: failed to get ["-d" "-u" "github.com/hugo-mods/icons"]: failed to execute 'go [get -d -u github.com/hugo-mods/icons]': failed to execute binary "go" with args [get -d -u github.com/hugo-mods/icons]: go: github.com/hugo-mods/icons: invalid github.com import path "github.com/hugo-mods"
hugo evn shows:
hugo v0.111.3+extended freebsd/amd64 BuildDate=2023-03-17T03:01:46Z+0000 VendorInfo=freebsd
go version shows:
go version go1.19.7 freebsd/amd64
Any idea what goes wrong?
Please post your site configuration file and the go.mod file from the root of your project.
go.mod content was posted already above.
Here is the content of my config.toml file (removed baseURL and title).
baseURL = 'xxx'
languageCode = 'en-us'
title = 'xxx'
enableRobotsTXT = "true"
path = "github.com/hugo-mods/icons"
Victor_Hugo = "true"
Focus_Keyword = ""
subtitle = ""
name = "All posts"
url = "/posts/"
weight = 2
name = "Impress"
url = "/impress"
weight = 3
name = "Tags"
url = "/tags"
weight = 4
Yeah, I wanted to confirm this, because the go.mod file in the root of your project is wrong.
Your site module has the same name as the module you are importing.
Give it a name unique to your project.
hugo mod init foo/bar
Looks like I lack some base understanding how modules work / what modules are …
Do you know a tutorial somewhere giving just some basic understanding?
sorry again me.
I still have some problems. I followed the steps here: GitHub - hugo-mods/icons: A Hugo icon system module that scales.
Initialize Hugo’s mod system on your site:
hugo mod init github.com/<username>/<your-repo>
I struggle already here. I don’t have my site on github but locally on my PC. What should it look like then?
I’m in my hugo website folder:
Should I do this then such as
hugo mod init ~/hugo_site/icons
And what path should I put in my toml file?
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.