Fonts 404 error


#1

Hello,

My site: https://2018-fonttest.netlify.com

I am trying to add some fonts to a website. They appear to load correctly in chrome, however, I get 404 errors saying the files are missing. They do appear in firefox without console errors. I am using the netlify victor-hugo boilerplate. https://github.com/netlify-templates/victor-hugo

The font stylesheets are being imported into the main.css. The following pictures show the project structure and css.

main.css
image

project tree

font stylesheet


#2

Hello, could you try using /fonts/ instead of …/fonts? Make sure the fonts directory is at the root level of your static assets directory


#3

I’m not sure the assumption you’re using for that path will work. Like @Weru says, put your fonts in /static in your project (under “site” for you I think), which gets merged by Hugo to the root of your site on publish.

Reference the files accordingly.