CaiJimmy / hugo-theme-stack-starter

A quickstart template to create a Hugo blog using hugo-theme-stack
https://demo.stack.jimmycai.com
MIT License
305 stars 105 forks source link

How can I change the Font-family #31

Closed 3000ye closed 8 months ago

3000ye commented 8 months ago

I add the code into my custom.scss, but work only on my macbook.

How can I make it word on any machine? Where shoud I upload the font?

:root {
    --code-font-family: "ComicMono Nerd Font", Menlo, Monaco, Consolas, "Courier New", monospace;
}
CaiJimmy commented 8 months ago

I add the code into my custom.scss, but work only on my macbook.

Because that font is not available on every machine

How can I make it word on any machine?

Check out this tutorial: https://www.w3schools.com/css/css3_fonts.asp

For instance, you can upload the font to a CDN server, or just put font files in static folder.

3000ye commented 8 months ago

It works! I add my font files in static/. thank u.