Hello, everyone.
I need your help. I am trying to use Hugo modules for the first time and I followed this tutorial but my icon is not showing.
I am trying to display an icon here:
{{ with resources.Get "icons/camera.svg" }}
I have generated both go.mod
and go.sum
files using this command
hugo mod init github.com/my-github-username/my-hugo-project
This is my go.mod
file:
module github.com/aghwotu/hugo-react-blog
go 1.16
require (
github.com/twbs/bootstrap v5.0.1+incompatible // indirect
github.com/twbs/icons v1.5.0 // indirect
)
And this is my go.sum
file:
github.com/twbs/bootstrap v5.0.1+incompatible h1:XW1ZMrcg2ZTTQFKtE/i5HUagYsAao/hqfN30dJeBpVk=
github.com/twbs/bootstrap v5.0.1+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/icons v1.5.0 h1:mFxEKeYHAaWdtp6mQiKct8biCqCO2G87EAhF3skpRvU=
github.com/twbs/icons v1.5.0/go.mod h1:GnRlymgVWp5iVJCMa0Me5b6tFyGpVc2bSxPMRGIJmyA=
And this is my config.toml file:
[module]
[[module.imports]]
path = "github.com/twbs/icons"
[[module.imports.mounts]]
source = "icons"
target = "assets/icons"
Thank you for your help.