Maybe there’s another way, but you can work around the Font Awesome tagging issue by forking.
1) Visit https://github.com/FortAwesome/Font-Awesome/fork.
2) Press the Fork button.
3) Press the Create fork button.
4) Clone the new repository, something like:
cd $HOME/code
git clone https://github.com/jmooring/Font-Awesome
cd Font-Awesome
5) When you cd
into the directory, you will be on the 6.x branch.
6) Initialize as a Go module, ending with /v6
, something like:
go mod init github.com/jmooring/Font-Awesome/v6
7) Commit the change, tag, and push back to your fork:
git add go.mod
git commit -m "Initialize Go module"
git tag v6.2.1
git push
git push --tags
8) In your Hugo site configuration, import the new module (note the /v6
at the end), something like:
[[module.imports]]
path = "github.com/jmooring/Font-Awesome/v6"
9) If you have been testing, clear the caches:
# The command below is irreversible! Make sure you don't delete /tmp.
sudo rm -rf /tmp/hugo-cache
go clean -modcache
10) Build your site and examine the go.mod file. It should look something like:
module mysite
go 1.19
require (
github.com/jmooring/Font-Awesome/v6 v6.2.1 // indirect
github.com/razonyang/hugo-mod-icons v0.1.0 // indirect
)
I’ll leave the github.com/jmooring/Font-Awesome
repository in place for a couple of days if you want to test with it, but I’m deleting it on 14 December 2022.