Closed thedivtagguy closed 3 years ago
Hugo reads your static files from the /static
folder. Try to move your font files under /static/fonts
within your root folder. This will result in a location of /public/fonts
after building the site.
Thank you, that works perfectly! I should have realized this earlier.
Hi! First of all, thank you for a great project. I use your starter for all of my websites and I'm grateful to you for making it so easy to get started!
For my current project, I wanted to load some fonts I had bought and downloaded. I've tried all possible ways but the site just won't load them. My process has been as follows:
I have added a new folder called
fonts
in my root directory, which is from where Hugo reads my static files.I have added the following CSS in the
site.css
file (which is here)For the purposes of trial, I've included some fonts in the
woff2
andotf
format.tailwind.config.js
looks like (you can find it here):However, when I try loading something like this:
My font files aren't being loaded. How can I fix this?
My repo is here: https://github.com/thedivtagguy/website-source/