On this page
Basics
Fonts
Thulite recommends hosting fonts in your project with Fontsource.
This keeps font delivery local, predictable, and privacy-friendly.
Recommended setup (Fontsource)
Add a Fontsource package:
Mount the package to
static/fontsinconfig/_default/module.toml:module.toml [[mounts]] source = "node_modules/@fontsource-variable/geist" target = "static/fonts/geist"Define
@font-faceinassets/scss/common/_fonts.scss:_fonts.scss @font-face { font-family: "Geist Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/geist/files/geist-latin-wght-normal.woff2) format("woff2-variations"); }Apply it in
assets/scss/common/_variables-custom.scss:_variables-custom.scss $font-family-sans-serif: "Geist Variable", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
This project already follows this pattern with Geist and Geist Mono.
Learn more
Fontsource
Install and self-host open source fonts.
Hugo Module Mounts
Map files from node_modules into your Hugo project.
Prev
Images