You won’t be able to replace
[css.fontAwesome]
version = “4.7.0”
sri = “sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==”
with
[css.fontAwesome]
version = “5.0.13”
sri = “sha384-xymdQtn1n3lH2wcu0qhcdaOpQwyoarkgLVxC/wZ5q7h9gHtxICrpcaSUfygqZGOe”
or its newest version
[css.fontAwesome]
version = “5.1.0”
sri = “sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt”
with the current version of hugo-academic theme (v2.3.0). If you build your site with
[css.fontAwesome]
version = “4.7.0”
sri = “sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==”
and check the page source, you see that hugo-academic theme (v2.3.0) gets its font-awesome icons from
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css
If you build your site with
[css.fontAwesome]
version = “5.1.0”
sri = “sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt”
and check the page source, you’ll see the following
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.1.0/css/font-awesome.min.css
But, if you check
you see that the latest version is 4.7.0. So your site cannot get the icons for version 5.1.0 from this address because it doesn’t exist.
One one of fixing it is going to themes/hugo-academic/layouts/partials/header.html and changing the following lines:
{{ printf "<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/%s/css/font-awesome.min.css\" integrity=\"%s\" crossorigin=\"anonymous\">" $sri.css.fontAwesome.version $sri.css.fontAwesome.sri | safeHTML }}
to
{{ printf "<link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v%s/css/all.css\" integrity=\"%s\" crossorigin=\"anonymous\">" $sri.css.fontAwesome.version $sri.css.fontAwesome.sri | safeHTML }}
And this
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/{{- $sri.css.fontAwesome.version -}}/css/font-awesome.min.css">
to
<link rel="stylesheet" href="//use.fontawesome.com/releases/v{{- $sri.css.fontAwesome.version -}}/css/all.css">
UPDATE:
I’ve just noticed that they changed the classes of some (maybe all?) of the icons from v4.7.0 to v5.1.0. For instance, the envelope icon changed from:
<i class="fa fa-envelope"></i>
to
<i class="fas fa-envelope"></i>
So you need to make other changes to the theme’s configuration. Making these changes might not be optimal, specially if we take into account that you’ll have to make all these changes again whenever the theme updates (unless they add them to it in future versions), but here’s how you do it:
Go to file layouts/partials/widgets/about.html and change the following line:
<i class="{{ $pack }} {{ $pack }}-{{ .icon }} big-icon"></i>
to
<i class="{{ $pack }} {{ .icon }} big-icon"></i>
And then you’ll need the following changes in the config.toml file:
From:
[[params.social]]
icon = "envelope"
icon_pack = "fa"
link = "mailto:test@example.org"
[[params.social]]
icon = "twitter"
icon_pack = "fa"
link = "//twitter.com/GeorgeCushen"
[[params.social]]
icon = "google-scholar"
icon_pack = "ai"
link = "https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ"
[[params.social]]
icon = "github"
icon_pack = "fa"
link = "//github.com/gcushen"
to:
[[params.social]]
icon = "fa-envelope"
icon_pack = "fas"
link = "mailto:test@example.org"
[[params.social]]
icon = "fa-twitter"
icon_pack = "fab"
link = "//twitter.com/GeorgeCushen"
[[params.social]]
icon = "ai-google-scholar"
icon_pack = "ai"
link = "https://scholar.google.co.uk/citations?user=sIwtMXoAAAAJ"
[[params.social]]
icon = "fa-github"
icon_pack = "fab"
link = "//github.com/gcushen"
And to add the goodreads icon, use
[[params.social]]
icon = "fa-goodreads"
icon_pack = "fab"
link = "//goodreads.com/USERNAME"
Like I said before, making all these custom changes might not be optimal, but it works for now.