Importing fonts into hugo

@font-face {
font-family: ‘Aeonik’;
src: url(‘…/fonts/Aeonik-Medium.woff2’) format(‘woff2’),
url(‘…/fonts/Aeonik-Medium.woff’) format(‘woff’);
font-weight: medium;
font-style: normal;
font-display: swap;

This is my code to import my font but it doesnt seem to work
The css is located in:
The font is located in:

Obviously, the font is not where you think it is. Try putting it in /static/fonts (which, btw, a search here in the forum would’ve told you).

The /assets directory is used for Resources (see documentation) and pipes. The static directory is used for static resources that don’t need further processing.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.