You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use custom fonts to match your documentation's visual identity. You can configure fonts for your entire site or separately for headings and body text using either Google Fonts or local font files. The default font is [Inter](https://fonts.google.com/specimen/Inter).
7
+
Use custom fonts to match your documentation's visual identity. You can configure fonts for your entire site or separately for headings and body text using either Google Fonts or local font files. The default font varies by theme.
8
8
9
9
## Google Fonts
10
10
11
-
The easiest way to use custom fonts is with Google Fonts. Simply specify the font family name and Mintlify will automatically load it.
11
+
[Google Fonts](https://fonts.google.com) are automatically loaded. Specify a font family name to use it.
12
12
13
-
```json docs.json
14
-
{
15
-
"fonts": {
16
-
"family": "Inter",
17
-
"weight": 400
18
-
}
19
-
}
20
-
```
21
-
22
-
### Separate fonts for headings and body
23
-
24
-
You can use different fonts for headings and body text:
25
-
26
-
```json docs.json
27
-
{
28
-
"fonts": {
29
-
"heading": {
30
-
"family": "Playfair Display",
31
-
"weight": 700
32
-
},
33
-
"body": {
34
-
"family": "Inter",
35
-
"weight": 400
36
-
}
37
-
}
13
+
```json
14
+
"fonts": {
15
+
"family": "Inter",
16
+
"weight": 400
38
17
}
39
18
```
40
19
@@ -170,48 +149,21 @@ You can also use external font URLs instead of local files:
170
149
</Expandable>
171
150
</ResponseField>
172
151
173
-
## Troubleshooting
174
-
175
-
### "Invalid url" error with local fonts
176
-
177
-
If you're getting an "Invalid url" error when using local fonts, ensure:
152
+
### Separate fonts for headings and body
178
153
179
-
1. Your font files are in the `assets/fonts` directory
180
-
2. The `source` path starts with `/assets/fonts/` (note the leading slash)
181
-
3. The file extension matches the `format` field
182
-
4. The font file exists and is accessible
154
+
You can use different fonts for headings and body text:
0 commit comments