Skip to content

[Good First Issue]: perf(frontend): add font preload to eliminate render-blocking font fetch on LCPΒ #112

@ambicuity

Description

@ambicuity

πŸ†• 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 /assign to 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:


πŸ‘Ύ 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

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomers β€” welcoming entry pointneeds-triageAwaiting maintainer review and categorizationperformancePerformance and Core Web Vitalsstatus: in-progressActively being worked ontype: enhancementNew feature or requestui/uxFrontend UI and UX improvements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions