fonts field in docs.json when you want a different typeface. Family names without source load from Google Fonts. Add source when you want to self-host a custom font from public/.family field to any Google Fonts family name. Holocron automatically generates the stylesheet link and preconnect tags for you.12345{ "fonts": { "family": "DM Sans" } }
heading and body fields to set different fonts for each. For example, a serif font for headings with a clean sans-serif for body text:123456{ "fonts": { "heading": { "family": "Fraunces", "weight": 700 }, "body": { "family": "DM Sans", "weight": 400 } } }
family sets the base font for everything. heading and body override it for their respective contexts. If you only set heading, body text still uses the base font.public/ and reference it with source:1234567{ "fonts": { "family": "My Custom Font", "source": "/fonts/custom-font.woff2", "format": "woff2" } }
| Field | Type | Description |
family | string | Font family name. Google Fonts names load automatically |
weight | number | Font weight (e.g. 400, 700) |
source | string | URL or local path to a font file |
format | "woff" | "woff2" | Font file format. Required when using a local source |
heading | object | Override font for headings only |
body | object | Override font for body text only |
heading and body fields accept the same properties: family, weight, source, and format.