Skip to content
This repository was archived by the owner on Nov 30, 2026. It is now read-only.

Preload primary fonts and advertise the changelog feed - #185

Merged
Urigo merged 2 commits into
mainfrom
font-preload-and-feed
Sep 2, 2026
Merged

Urigo merged 2 commits into
mainfrom
font-preload-and-feed

Conversation

@Urigo

@Urigo Urigo commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What

The last two refinements from the round-4 production review:

  1. Font preloading — the Neue Montreal woff2 files were only discovered after the stylesheet downloaded and parsed, so first visits flash the fallback font before the swap. The Regular and Medium weights (body + headings) are now <link rel="preload" as="font">-ed from every page head, via a FontPreloads component rendered by SocialMetadata (the one component every page already includes). The URLs come from the same Vite asset imports the CSS resolves, so the preloaded hash exactly matches what @font-face requests — verified in the built output (same hashed filename in CSS url() and the preload) — and the base path applies automatically. SemiBold is left to load on demand.

  2. Changelog feed autodiscovery — the blog advertises its RSS feed via rel="alternate", but product-updates pages never referenced /feed.xml (the Hive Changelog feed), so feed readers couldn't autodiscover it. Both the product-updates index and detail pages now carry the link.

Verification

Prefixed build passes the base-path verifier with correctly prefixed preload URLs; plain preview build emits un-prefixed ones; font hashes match between CSS and preloads (no double-download); typecheck green.

🤖 Generated with Claude Code

- The Neue Montreal woff2 files were only discovered after the
  stylesheet downloaded and parsed, so first paint flashed the fallback
  font. The Regular and Medium weights (body text and headings) are now
  preloaded from every page head via the component every page already
  includes; the hashed URLs come from the same Vite asset imports the
  CSS uses, so the preload warms the exact resource the fonts load from.
- Product-updates pages now advertise the Hive Changelog RSS feed
  (/feed.xml) via a rel=alternate link, like the blog does for its feed,
  so feed readers can autodiscover it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

@@ -76,6 +78,8 @@ const breadcrumbJsonLd = JSON.stringify({
});
---

{/* Rendered here because every page head includes this component. */}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While this makes sense to put here, this component should maybe have a different name and not SocialMetadata.

(not a blocker for this PR)

Per review: the component long outgrew its name — it renders the
description, canonical, social/OpenGraph tags, BreadcrumbList structured
data, feed and llms.txt discovery, font preloads, and the title.
BaseHead is the conventional Astro name for the shared head component.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Urigo

Urigo commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Renamed in the latest commit — SocialMetadata → BaseHead (the conventional Astro name for the shared head component), with a doc comment listing everything it actually renders. All 15 usage sites updated; build + typecheck green.

@Urigo
Urigo merged commit 5d547d3 into main Sep 2, 2026
9 checks passed
@Urigo
Urigo deleted the font-preload-and-feed branch September 2, 2026 19:16

This branch was successfully deployed

3 active deployments
astro-preview — d198ce01 Deployed Sep 2, 2026 by Urigo via astro-website-preview / deployment #799
preview — d198ce01 Deployed Sep 2, 2026 by Urigo via website-preview / deployment #799
storybook-preview — d198ce01 Deployed Sep 2, 2026 by Urigo via storybook-preview / deployment #799
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants