-
Notifications
You must be signed in to change notification settings - Fork 14
Description
π Newcomer Friendly
This is a Good First Issue β a focused performance improvement to the <head> of docs/index.html.
What you will do
- β
Add a
<link rel="preload">tag for the Inter woff2 font above the Google Fonts stylesheet link - β
Confirm the existing Google Fonts URL retains
&display=swap - β Submit a pull request
Important
- Basic HTML knowledge is sufficient
- Comment
/assignto claim this issue - Read CONTRIBUTING.md before opening a PR
Note
β±οΈ Typical time to complete: 20β45 minutes
π§© Difficulty: Single tag addition in HTML <head>
π Best for: First-time contributors interested in web performance
π When this issue is complete, you will have:
- β A merged PR in a real open-source project
- β Your name in the Contributors Hall of Fame
πΎ Task Description
At lines 17β21 of docs/index.html, Inter and Outfit fonts are loaded via Google Fonts. Although the URL includes &display=swap, there is no <link rel="preload"> for the primary Inter font β meaning browsers fetch it at default priority, which delays LCP (Largest Contentful Paint) on slow connections.
Add this line ABOVE the existing Google Fonts <link> tag (docs/index.html line 17):
<link rel="preload" as="font" type="font/woff2" crossorigin
href="https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2">Also verify the existing <link> for Google Fonts retains &display=swap (it currently does β just confirm).
File to edit: docs/index.html, lines 17β21
β Acceptance Criteria
- A
<link rel="preload">for the Inter woff2 file is placed before the Google Fonts stylesheet<link> - The Google Fonts URL retains
&display=swap - No other HTML or CSS is changed
- Page loads correctly in both dark and light themes
- Existing tests still pass (
make test) - PR linked with
Fixes #<number> - PR title:
perf(frontend): add font preload to eliminate render-blocking font fetch