halogenica / beautifulhugo

Theme for the Hugo static website generator
Other
1.13k stars 601 forks source link

Using Fontawesome #409

Open stockphrase opened 3 years ago

stockphrase commented 3 years ago

I'm using FontAwesome icons in another Hugo site, which work as expected. I'm using the following line in the header partial:

<script defer src="/css/all.js"></script>

I'm attempting to do the same with BeautifulHugo by placing the same line in /layouts/head_custom.html

But this doesn't work. The only thing it does seem to do is blow up the icons in the footer. Any pointers?

Screenshot from 2021-08-02 08-59-30

VincentTam commented 2 years ago

Why have you placed all.js inside the folder static/css/ instead of static/js/? Besides, it's better to let Hugo to decide the path instead of hard-coding that.

{{ "js/foobar.js" | absURL }}

I rmb code like this can be found somewhere in layouts/partials/.