Skip to content

Commit 5b340a7

Browse files
committed
remove troubleshooting section
1 parent 3fd4094 commit 5b340a7

File tree

1 file changed

+15
-63
lines changed

1 file changed

+15
-63
lines changed

fonts.mdx

Lines changed: 15 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,16 @@ description: "Configure custom fonts"
44
icon: "type"
55
---
66

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 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.
88

99
## Google Fonts
1010

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.
1212

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
3817
}
3918
```
4019

@@ -170,48 +149,21 @@ You can also use external font URLs instead of local files:
170149
</Expandable>
171150
</ResponseField>
172151

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
178153

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:
183155

184-
**Correct example:**
185-
```json
156+
```json docs.json
186157
{
187158
"fonts": {
188159
"heading": {
189-
"family": "InterDisplay",
190-
"source": "/assets/fonts/InterDisplay-Bold.woff2",
191-
"format": "woff2"
160+
"family": "Playfair Display",
161+
"weight": 700
162+
},
163+
"body": {
164+
"family": "Inter",
165+
"weight": 400
192166
}
193167
}
194168
}
195169
```
196-
197-
### Font not loading
198-
199-
If your custom font isn't loading:
200-
201-
1. **For Google Fonts:** Verify the font family name is spelled correctly and exists on Google Fonts
202-
2. **For local fonts:** Check that the font file path is correct and the file is accessible
203-
3. Clear your browser cache and refresh the page
204-
4. Check the browser's developer tools for any font loading errors
205-
206-
### Variable fonts
207-
208-
Variable fonts allow you to specify precise font weights (e.g., 550 instead of just 400 or 700):
209-
210-
```json docs.json
211-
{
212-
"fonts": {
213-
"family": "Inter",
214-
"weight": 450
215-
}
216-
}
217-
```

0 commit comments

Comments
 (0)