Skip to content

fix(docs): load Inter fonts relative to the docs site base path - #374

Open
Ultroncn wants to merge 1 commit into
github:mainfrom
Ultroncn:fix/docs-font-paths
Open

Ultroncn wants to merge 1 commit into
github:mainfrom
Ultroncn:fix/docs-font-paths

Conversation

@Ultroncn

Copy link
Copy Markdown

Hi! This fixes #109.

Problem: the docs site is served from a subdirectory (https://github.github.io/catalyst/), but the vendored docs/primer.css referenced the Inter font files with root-absolute URLs (url("/fonts/Inter-*.woff")). Browsers therefore requested them from the domain root, where they don't exist, so the site fell back to system fonts even though the font files are shipped in docs/fonts/.

Fix: changed all 12 font URLs in docs/primer.css to relative paths (url("fonts/Inter-*.woff")). Since primer.css is served from the same directory as the fonts/ folder, the fonts now resolve under the site's base path. The stylesheets themselves are already linked with {{ site.baseurl }} in _layouts/default.html, so only the URLs inside the CSS needed this change.

I couldn't run the Jekyll site build locally in this environment, so the fix is verified by inspection: the font files exist at docs/fonts/Inter-{Regular,Medium,Bold}.woff and the relative URLs resolve against the served location of primer.css.

Fixes #109

The docs site is served from a subdirectory
(https://github.github.io/catalyst/), but the vendored primer.css
referenced the Inter font files with root-absolute URLs
(url("/fonts/Inter-*.woff")), so browsers requested them from the
domain root where they do not exist and fell back to system fonts.

Use relative URLs (url("fonts/Inter-*.woff")) instead: primer.css is
served from the same directory as the fonts/ folder, so the fonts
resolve under the site's base path.

Fixes github#109
@Ultroncn
Ultroncn requested a review from a team as a code owner November 16, 2026 21:58
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain, and the change consistently updates all Inter font references to stylesheet-relative paths while preserving the existing font files and loading configuration.

Copilot wasn't able to review any files in this pull request.

1 file not reviewed
  • docs/primer.css: Generated file

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fonts aren't loaded on docs site.

2 participants