1. Documentation
  2. Manage Website
  3. Fonts
ReadmeGitHub
  • Introduction
  • Quickstart
  • Text
  • Code
  • Lists
  • Tables
  • Accordion
  • Badge
  • Button
  • Callout
  • Code Block
  • Code Block Group
  • Code Snippet
  • Columns
  • Custom components
  • GitHub
  • Hover Card
  • Mermaid
  • Properties
  • Related Topics
  • Tabs
  • Tree
  • Images
  • Video
  • Files
  • Grain
  • Shade
  • Moss
  • Configuration
  • Content
  • Navigation
  • Site Identity
  • Appearance
  • Header and Footer
  • Fonts
  • Icons
  • Integrations
  • Search
  • OpenAPI
  • AI Chat
  • React Router
  • Astro
  • Next.js
  • Cloudflare
  • Vercel
  • robots.txt
  • sitemap.xml
  • JSON-LD
  • rss.xml
  • llms.txt
  • llms-full.txt
  • .md endpoints

Fonts

Change the project-level font import and --heyo-docs-font-family token used by built-in themes.

Loading documentation…

Header and Footer< PreviousIconsNext >

Powered by heyo

On this page

Find the application stylesheetReplace the familySeparate body and code fonts when needed

Fonts are selected by the application, not by heyo-docs.config.ts. This keeps font files statically imported and lets the chosen framework bundle only the family the documentation actually uses.

The supplied projects use Figtree Variable and expose it to the active theme through the --heyo-docs-font-family CSS custom property.

Find the application stylesheet

FrameworkStylesheet
React Routerapp/app.css
Next.jsapp/app.css
Astrosrc/styles/app.css

Each generated stylesheet imports a Fontsource package and sets the custom property. The framework root separately loads the stylesheet generated for the selected Heyo Docs theme:

css
@import "@fontsource-variable/figtree";:root {  --heyo-docs-font-family: "Figtree Variable", sans-serif;}

The built-in themes map that variable to their sans and heading font tokens. It is also used by Mermaid diagrams, so a single change keeps prose, controls, and diagrams visually consistent.

Replace the family

Install a local variable font package, update the CSS import, and set the matching family name:

bun add @fontsource-variable/manrope
app/app.css
@import "@fontsource-variable/manrope";:root {  --heyo-docs-font-family: "Manrope Variable", ui-sans-serif, sans-serif;}

Use the family name published by the package. Keep the system fallbacks so the site remains readable if a font request is delayed or a browser blocks a resource.

The project must also remove the old font import and dependency when Figtree is no longer used. That avoids shipping two families merely because the starter stylesheet was left unchanged.

Separate body and code fonts when needed

The code blocks in the built-in themes use a monospace system font stack independently of --heyo-docs-font-family. This preserves source-code alignment even when the documentation uses a display-oriented body family.

If a project needs a custom code font, override the code-block font rule in the application stylesheet and check wrapping, line numbers, copy controls, and both color modes. A monospaced family with clear punctuation and distinguishable characters is more important than matching the body font.